Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2014-12-09
1
408 Views
Last Modified: 2014-12-11
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.
0
Comment
Question by:Joseph Daly
1 Comment
 
LVL 27

Accepted Solution

by:
Dan McFadden earned 500 total points
ID: 40491011
The command looks good, though I would use the name without the asterisk to be on the safe side.

Dan
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question