Avatar of Joseph Daly
Joseph Daly
Flag for United States of America asked on

Active Directory restoration of deleted computer account with Restore-ADobject cmdlet

Someone at some point deleted one of our servers from active directory which i just noticed today. I have ran the powershell to search the deleted items container and found the object there. We do not have the recyling bin enabled so I will need to use the powershell to do this.

The command I am running to find the computer object is as follows.

get-adobject -filter 'isDeleted -eq $true' -IncludeDeletedObjects | where-object {$_.name -like "servername*" -and $_.objectclass -eq "computer"}

This returns a single object of the computer account.

Now to restore it I can simply pipe to restore-Adobject

get-adobject -filter 'isDeleted -eq $true' -IncludeDeletedObjects | where-object {$_.name -like "boslitfs02*" -and $_.objectclass -eq "computer"}  | restore-adobject

Is there anything else needed or any issues I may run into? I usually would just disjoin/rejoin domain for this type of issue but this server is taking part in a DFS namespace.

Any help is appreacited.
Active DirectoryWindows Server 2008Windows Server 2003

Avatar of undefined
Last Comment
Dan McFadden

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dan McFadden

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck