Nixadmins.net

Tag: Domain

Find stale / dead / removed computers or users from Active Directory using oldcmp from JoeWare.net

by Mats Hellman on Aug.12, 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.
Joeware.net

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

D:\Tools\JoeWare.NET\OldCmp.exe -report
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

D:\Tools\JoeWare.NET\OldCmp.exe -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

D:\Tools\JoeWare.NET\OldCmp.exe -report -age 120
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.

D:\Tools\JoeWare.NET\OldCmp.exe -users -report -age 120

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.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...