To find inactive computer in a domain controller.


Dsquery is the command to get inactive computers in a domain. The syntax is given below.

a.Echo all inactive computer accounts (more than 4 weeks inactive):
C:\> dsquery computer -inactive 4

b.Disable all inactive computer accounts (more than 4 weeks inactive):

C:\> dsquery computer -inactive 4 | dsmod computer -disabled yes

c.Find all computers in the Chennai OU:

C:\> dsquery computer ou=chennai,ou=computer,dc=test,dc=com

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: