SMTP Port 25

Anything and Everything Related Exchange, Emails and Active Directory and Scripting, Its My Life !!!

  • Microsoft MVP – Powershell

  • Expert Certificate

  • Visitors from the Globe

  • Blog Stats

    • 333,878 hits
  • Meta

  • Disclaimer

    The content on this site is provided "AS IS" with no warranties, and confers no rights.

  • My tweets..

    • watching "zindagi na milegi dobara".. man its touching.. 4 months ago
    • Its one of the my coldest day ever seen in Bangalore - 19°C and its expected to reduce between 18°C to 16°C on 31st and 1st 4 months ago
    • Started to explore Lync 2010. I got to deep dive into it... 4 months ago
    • Weekend drive to Wayanad was beautiful. Been to kerala after 6 years. Some good old memories was sweet ;) 5 months ago

Recovering Deleted User Ad account throught Active Directory powershell

Posted by Krishna - MVP on April 22, 2009

We can recover any Active Directory deleted object with in the Tombstone period.
Tombstone lifetime can be found in active directory using below steps

• Load the ADSIEdit snap-in by navigating to start menu, programs, Windows 2000 Support Tools, Tools, ADSI Edit, or simply type adsiedit.msc at the run command.
• Navigate down to CN=Directory Service, through Configuration, CN=Configuration,DC=domainName,DC=com, CN=Services, CN=Windows NT, right-click and choose properties. 
• scroll down to tombstoneLifetime. This will have Tombstone period

Get-QADUser -Tombstone

Will get the list of user accounts which are Deleted and residing in Tombstone

  

Get-QADUser -Tombstone <name> |restore-QADDeletedObject

Will restore the user object in to the OU LOSTANDFOUND

  

Get-QADUser -Tombstone -LastKnownParent ‘<DN of container>’
Restores all user accounts that were deleted from a particular container to OU LOSTANDFOUND.

 

 Get-QADUser –Tombstone –LastChangedOn (get-date -year 2008 -month 9 -day 1)

Restores all user accounts that were deleted on September 1, 2008

 

Get-QADUser –Tombstone  <username> | fl

Gives the complete details of the -Tombstone account which can help in finding detained information of the Tombstoned account

One Response to “Recovering Deleted User Ad account throught Active Directory powershell”

  1. mohammad said

    add user in active directury

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 31 other followers