Scan Active Directory for old user account, Disable those accounts and move them to alternate OU. (Powershell)

** THIS SCRIPT IS PROVIDED WITHOUT WARRANTY, USE AT YOUR OWN RISK **

This script will search an Active Directory OU of your choice for users that have not logged in for 30 days. The script will then disable those users and move them to another OU of your choice. You will also get a CSV output of the results.

Tested with Windows 7, Windows Vista, Windows Server 2K8 R2

 

Leave a Reply