Old tools still handy today
Today I was asked to complete a task by my co-worker, find computer accounts that have not been used in 90 days and have them disabled. Tried looking at some PowerShell scripts, but didn't want to rewrite a script or piece it together. Also since I had to leave in less than an hour I needed something fast.
Searching my all time favorite tool, I came across this helpful admin tool.
Oldcmp
Basically this is a command line tool to search and disable (or delete) computer accounts. I ran the command with the following switches.
oldcmp -report
This first gave me an idea of how many accounts where reported, with no change.
Then I ran the actual command.
oldcmp -nodc -disable -safety 500 -unsafe -forreal
After this another report is automatically created and was able to disable the computer accounts in about 1 minute.
It's decently fast and honestly, would have taken me hours to really do this without the tool. Even with a script I would still have to tested it, ran in a development environment and I often don't trust my own scripts to disable accounts. :)
No comments:
Post a Comment