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 and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store