Created
February 21, 2018 05:00
-
-
Save lucasmelin/20c4cec136f4ec2122d6f1c670c7eb50 to your computer and use it in GitHub Desktop.
Powershell script to get all disabled Active Directory users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADUser -Filter * -SearchBase "ou=Disabled Accounts" -Searchscope "onelevel" | select givenname,surname,samaccountname,whenchanged | Out-File "disabled_users.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment