Created
February 7, 2018 16:25
-
-
Save royashbrook/9165c6726c304904ee23e9b9196fefa1 to your computer and use it in GitHub Desktop.
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
# Confirm system access: | |
"user1","user2" | Get-ADUser -properties * | ft SamAccountName, DisplayName, Enabled | |
# Disable: | |
"user1","user2" | Disable-ADAccount | |
# If processing a change for folks who should be terminated, easier to do this: | |
$userlist = "user1","user2" | |
$userlist | Get-ADUser -properties * | ft SamAccountName, DisplayName, Enabled | |
$userlist | Disable-ADAccount | |
$userlist | Get-ADUser -properties * | ft SamAccountName, DisplayName, Enabled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment