To find inactive computer in a domain controller.
August 21, 2013 Leave a comment
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