Archived from groups: microsoft.public.win2000.active_directory (
More info?)
So if I understand correctly that you are trying to search only the "dallas"
ou for stale paswword computers and
that your ou structure is ou=dallas,
ou=texas,ou=northamerica,dc=world,dc=com ???
You just need to specify the complete DN of the start of your search. Use
the output of the dsquery that works as guidance for the ou DN to use in a
more selective search.
--
/kj
"spr" <jaybruce (take out big space) @hotmail.com> wrote in message
news:bh_Me.64626$Vk3.13413@fe08.news.easynews.com...
>
> "kj" <kj@nowhere.com> wrote in message
> news:O3$OBL1oFHA.2472@tk2msftngp13.phx.gbl...
>> easy.
>>
>> dsquery computer -inactive x ( x= number of weeks the computer has been
>> inactive )
>>
>> or, if you like the password change methode or want day granularity, use;
>>
>> dsquery computer -stalepwd y (y=number of days since the computer
>> password has been changed )
>>
>> Since you want to 'prune the deadwood', do it all in one shot and
>> 'disable' the computers so they appear in ADU&C with a red X by;
>>
>> dsquery computer -stalepwd 60 | dsmod computer -disabled yes
>>
>> Then in ADU&C you can delete all the red X computers.
>>
>> There is a way to directly delete the computer accounts using dsrm, but
>> I'd suggest getting more familiar with the other DSxx tools before using
>> that one.
>>
> This is working GREAT!! I'm finding what I need using:
> example ou layout
> domain=world
> ou structure=/northamerica/usa/texas/dallas
>
> dsquery computer -name *elmstreet -stalepwd 60 works
> dsquery computer -name *pinestreet -stalepwd 60 works
>
> but
> dsquery computer ou=dallas,dc=world -name *elmstreet -stalepwd 60
> fails
> gives me: "dsquery failed:A referral was returned from the server."
>
>
> I love this but would like to figure out the syntax I'm messing up, so I
> can query my whole ou instead of indivual wildcard 'streets'
>
> Thanks again to all for pointing me to these tools, and special thanks to
> JSilva for the dsxxxx tools.
>