Restore-ADObject
CautionRestore deleted objects
Get-ADObject -Filter 'Name -like "*taro*"' -IncludeDeletedObjects | Restore-ADObject
Recovers deleted users/groups from the AD Recycle Bin — SIDs and memberships intact, unlike recreation.
Examples
Get-ADObject -Filter 'isDeleted -eq $true' -IncludeDeletedObjects | select NameList deleted objects
Syntax
Get-ADObject -Filter f -IncludeDeletedObjects / Restore-ADObject <obj>
Before you run it
Requires the Recycle Bin feature.
Related commands
- Enable-ADOptionalFeatureEnable the AD Recycle Bin
- New-ADUserCreate AD user
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store