We will recovery accidently deleted user account via PS in windows 2012 domain environment. To prepare the scenario we will fist delete the user and recovery it.
Log onto Windows 2012 DC with administrator privileges.Open PS with administrator privileges
Type following.
| Get-ADUser -Filter 'Name -like "*C-Ron Buzon"' |
We will delete the user
| Get-ADUser -Filter 'Name -like "*C-Ron Buzon"' | Remove-ADUser -Confirm:$false |
user has been deleted
we can see user within the Deleted Objects container in ADAC
| Get-ADobject -Filter 'Name -like "*C-Ron*"' -IncludeDeletedObjects |
we will restore this user
| Get-ADobject -Filter 'Name -like "*C-Ron*"' -IncludeDeletedObjects | Restore-ADObject |
if I check to see user is back to ADDS
Respectfully,
Oz Casey, Dedeal ( MVP north America)
MCITP (EMA), MCITP (SA)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +
http://smtp25.blogspot.com/ (Blog)
http://telnet25.wordpress.com/ (Blog)
No comments:
Post a Comment