Skip to content


Disable computer accounts from old computers

Summary of Issue

This command will find computer accounts that have not checked in to the servers in over 60 days and then disable their accounts. This is great to use to clean up the computer accounts in AD.

Methods to resolve the problem

Instructions

1. Run the following command on a Domain Controller

C:\> dsquery computer -stalepwd 60 | dsmod computer -disabled yes

Posted in Microsoft, Server 2003, Server 2008, Server: Active Directory, Windows.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.