Disable a user account in Active Directory.
Syntax Disable-QADUser [[-Identity] IdentityParameter] [-WhatIf] [-Confirm] Advanced_Options Key -identity The Distinguished Name (DN), Canonical Name, GUID or, where applicable, the Domain\Name, UPN or SID of the user object you wish to disable. -WhatIf Describe what would happen if you executed the command, without actually executing the command. -Confirm Prompt for confirmation before executing the command. Advanced_Options: [-UseGlobalCatalog] [-Proxy] [-Service String] [-ConnectionAccount String] [-ConnectionPassword SecureString] [-Credential PSCredential] [-Connection ArsConnection]
By default Disable-QADUser will connect to any available domain controller with the credentials of the locally logged on user, to connect to a specific domain controller using a specific account, either use the advanced options (-Proxy/-Service/-ConnectionAccount) or use the Connect-QADService cmdlet to make the connection.
Disable the user account JaneC in domain ss64Dom
PS C:> Disable-QADUser 'ss64Dom\JaneC'
“If you're an underdog, mentally disabled, physically disabled, if you don't fit in, if you're not as pretty as the others, you can still be a hero” ~ Steve Guttenberg
Enable-QADUser - Disable a user account
Unlock-QADUser - Unlock a user account
Deprovision-QADUser - Deprovision a user account in AD