Remove-ADUser
Use Remove-ADUser to delete an Active Directory user account. Confirm the identity first — deletion is immediate and hard to undo.
Documentation: Microsoft Learn — Remove-ADUser
Syntax
See the command anatomy
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Remove-ADUser [-Identity] <ADUser> [-Server <String>] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]- Stage 1Remove-ADUser
-Identity -Server -Credential -WhatIf -Confirm
Try it
PowerShell example · browser support is limited.
Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.
Follow the objects
Run the command to inspect each stage.
Examples
Remove-ADUser -Identity jsmith
Show reference output
Sample output · fictional data, shaped like the real thing
Name SamAccountName ---- -------------- Amit Jones ajones Mei Chen mchen
Remove-ADUser -Identity jsmith
Show reference output
Sample output · fictional data, shaped like the real thing
Name SamAccountName ---- -------------- Priya Nair pnair Amit Sharma asharma
Get-ADObject -Filter "isDeleted -eq $true"
Show reference output
Sample output · fictional data, shaped like the real thing
Name ---------- Jane Smith Alex Jones
Parameters
Parameter definitions:
-Identity-Server-Credential-WhatIf-Confirm
Practical use and troubleshooting
Practical scenario: Use Remove-ADUser when you need to delete an Active Directory user account. Confirm the identity first — deletion is immediate and hard to undo. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.
Common error and fix: Identity not found can indicate the wrong domain or an account already removed. Resolve the exact object and review dependencies before any destructive retry. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.
See also: Disable-ADAccount. Remove-ADUser deletes the directory user; Disable-ADAccount preserves the object while preventing account use. Offboarding requirements should decide which operation is appropriate. Read the linked command before substituting it; similar names do not imply identical inputs or output.
Recap
Remove-ADUser Use Remove-ADUser to delete an Active Directory user account. Confirm the identity first — deletion is immediate and hard to undo.
Next: New-ADUser