To recover a deleted object, use the Get-ADObject cmdlet from the Active Directory Module for Windows PowerShell, being sure to open the module using the Run As Administrator option. Get-ADObject can be used to find objects, which can then be recovered using the Restore-ADObject cmdlet. For example, the following syntax, recovers a deleted user account for user Zachary Sefanov:
Get-ADObject –Filter {displayName –eq “Zachary Sefanov”} –IncludeDeletedObjects | Restore-ADObject
For more information about these cmdlets, type Get-Help Get-AdObject of Get-Help
Restore-ADObject from PowerShell.
Source of Information : Sams - Windows Server 2008 R2 Unleashed
No comments:
Post a Comment