PowerShell: Disabled Users List

Tags PowerShell

Instructions

Run the following PowerShell script in a PowerShell window to create a csv formated list of disabled users.  The list will be found in the temp folder of drive c:.  Your account must have the necessary rights to get the list from Active Directory Services. 

Script:

Search-ADAccount -AccountDisabled | Format-List -Property Name, LastLogonDate, UserPrincipalName

Details

Article ID: 438
Created
Wed 6/15/22 9:40 AM
Modified
Thu 4/18/24 10:23 AM