Find stale / dead / removed computers or users from Active Directory using oldcmp from JoeWare.net
by Mats Hellman on 12.Aug, 2008 under Windows
I noticed our Active Directory domain and Windows Server Update Services had a small difference of about 200 workstations.
The forgotten computers
Naive as I was I never thought that we could “forget” 200 workstations in our domain. So I had to find a tool to get the job done. Luckily I found oldcmp at Joeware.net. This small 222kb tool promised to do what I needed done and I could even get a report in HTML, CSV or DHTML.

Using OldCmp
The use of this program is more than simple, but beware, don’t use delete unless you really now the computer accounts are dead.
The program has a few safeguards to keep you from doing something really bad, so I won’t show you anything other here than how to get a report from your Active Directory. If you want to delete or disable computers read the help.
Listing computers that haven’t changed their password in 90 days
OldCmp V01.05.00cpp Joe Richards (joe@joeware.net) December 2004
Processed at dc1.domain.local
Default Naming Context: DC=domain,DC=local
Search completed…
Creating Report File: oldcmp.20080812-233442.htm
Command completed successfully
Getting some help
– The above command lists the help, I won’t paste it here since it is quite long. You should read it anyway because it has more than a few good examples of the usage –
Listing computers that haven’t changed their password for more than 120 days
OldCmp V01.05.00cpp Joe Richards (joe@joeware.net) December 2004
Processed at dc1.domain.local
Default Naming Context: DC=domain,DC=local
Search completed…
Creating Report File: oldcmp.20080812-234028.htm
Command completed successfully
I settled for computer that haven’t changed their password for more than 120 days, there were still a few computers in use, but we quickly sorted them out and could now disable almost 200 computer accounts from our Active Directory.
Users instead of computers
You can also check dead users by giving the program the user switch.
The above obviously checks for users who haven’t changed their password in more than 120 days.
Also check out the other magnificent tools you can find at Joeware.net.

