May 2019
Intermediate to advanced
620 pages
21h 41m
English
To view the deleted objects for a domain, use the following lines of PowerShell on a system with the Active Directory Module for Windows PowerShell installed:
Import-Module ActiveDirectory
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=*)" -IncludeDeletedObjects
To restore a deleted object, use the following lines of PowerShell on a system with the Active Directory Windows PowerShell Module installed:
Import-Module ActiveDirectory
Get-ADObject -Filter {displayName -eq "DisplayNameOfTheObject"} -IncludeDeletedObjects | Restore-ADObject
Read now
Unlock full access