
$inactiveDays = 60 -> If you want change number of days to identify inactive users $searchRoot = “/” -> Change the domain name instead of Also it will generate an email alert to specified recepients with list of users as attachment.įollowings lines on the script to be changed according to your requirement

This script have two options you can just pull out list of inactive users report and the second option is to disable the inactive users and while disabling it will add description to those accounts. This script will identify users inactive for last 60 days in domain. Developed a powershell script to report and disable inactive users in domain.
