Problem solve Get help with specific problems with your technologies, process and projects.

Checking inactive accounts with Active Directory

How can I check what users have not logged into their accounts > 60 days using Active Directory and Windows 2000?
There are several ways to perform this. A simple way to perform this would be to run the NET USER command on any user that you would like to know. You could also use ADSI scripting to produce the output a little cleaner. . Output a list of the names by exporting them from AD. Then you can use a simply FOR statement to reset the accounts. Let's say your text file is names.txt. Create a batch file called CheckUser.bat. Put in the batch file the following:
FOR /F %%I in (names.txt) do SHOWUSER

Echo %%I 
NET USER %%I /DOMAIN | FIND "Last logon"

Dig Deeper on Windows systems and network management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.