How To Find And Remove Active Directory User Accounts By Last Logged On Time

Users, man, why can’t they delete their own accounts when they quit? Well, if they could do that, then you probably wouldn’t have much to do in Active Directory, nor would AD be as organized as you have it. Anyways, why trust that the service desk team will always remove every user in AD when you have the entire PowerShell engine at your fingertips? In this video, Anthony will walk you through how to find users in Active Directory based on their last logon time. This will allow you to automatically purge accounts that haven’t logged in for a specified period of time using Search-ADAccount. Prerequisites include: Active Directory PowerShell module