AD Objekte wiederherstellen
Papierkorb aktivieren:
Enable-ADOptionalFeature –Identity “CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=domain,DC=com” –Scope ForestOrConfigurationSet –Target easycash.de
Objekte wiederherstellen:
Import-Module activedirectory
Get-ADObject -filter * –IncludeDeletedObjects
Get-ADObject -filter {ObjectClass -like “user”}
Get-ADObject -filter {ObjectClass -like “computer”}
Get-ADObject -filter {ObjectClass -like “group”}
Get-ADObject -Filter {Name -like “*Joern Walter”}
Get-ADObject -Filter {displayName -eq “JoernWalter”} -IncludeDeletedObjects | Restore-ADObject -TargetPath “OU=Users,OU=Konfiguration,DC=NDSEDV,DC=DE”
Get-ADObject -Filter {displayName -eq “JoernWalter”} -IncludeDeletedObjects | Restore-ADObject
Get-ADObject -filter ‘samaccountname -eq “JoernWalter”‘ -IncludeDeletedObjects -properties * | Foreach-Object {Restore-ADObject $_.objectguid -NewName $_.samaccountname -TargetPath $_.LastKnownParent}