Inactive Users and Computers Tool for Active Directory

Posted by

Download from TechNet Galleries :


This is an updated version of two scripts i have previously posted on TechNet. It searches Active Directory for inactive users and computers. It offers the following features:

  • Searches entire AD or specific OU for inactive computers or users
  • Allows you to specify the number of days an object is inactive for
  • Allows you to omit certain users / computers from the search by specifying a description prefix. For example any user / computer you never want to process as inactive you could put DND for Do Not Disable in their description
  • Allows you to specify a new description to mark inactive accounts that have been found
  • Allows 4 modes of operation
    • Move inactive account to destination OU
    • Move inactive account to destination OU and then disable it
    • Delete inactive accounts
    • Report only – generates a csv file with information about the inactive objects

This script requires that you have relevant access and permissions to Active Directory, and you may to to run the script as an administrator if you are using UAC.

The script is dependant on Quest PowerShell commandlets which you can download freely from here