標籤:啟用ad資源回收筒 windows 2008 r2
參考這篇博文(配置Windows 2008 R2活動目錄資源回收筒),成功啟用AD資源回收筒,
實驗結果總結:用LDP.exe工具啟用跟還原都不成功,用Power shell命令成功,步驟如下:
1、啟用資源回收筒命令
Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, DC=CONTOSO,DC=com‘ –Scope ForestOrConfigurationSet –Target ‘contoso.com‘
2、查看資源回收筒狀態
get-adoptionalfeature -filter {name -like "*"}
3、查看對象狀態
Get-ADObject -SearchScope subtree -Filter {name -like "*"} -IncludeDeletedObjects
或者Get-ADObject -SearchScope subtree -Filter {name -like "*user1*"} -IncludeDeletedObjects
作個刪除操作,把user1使用者帳號刪除掉。
~~刪除前:
Deleted :
DistinguishedName : OU=test,DC=contoso,DC=com
Name : test
ObjectClass : organizationalUnit
ObjectGUID : 610b87d9-77e4-48be-8b1d-dbd58ca9d7c8
Deleted :
DistinguishedName : CN=user1,OU=test,DC=contoso,DC=com
Name : user1
ObjectClass : user
ObjectGUID : 7b24079e-06a8-4d98-9566-e9e9454676c6
~~刪除後:
Deleted : True
DistinguishedName : OU=test\0ADEL:610b87d9-77e4-48be-8b1d-dbd58ca9d7c8,CN=Delet
ed Objects,DC=contoso,DC=com
Name : test
DEL:610b87d9-77e4-48be-8b1d-dbd58ca9d7c8
ObjectClass : organizationalUnit
ObjectGUID : 610b87d9-77e4-48be-8b1d-dbd58ca9d7c8
Deleted : True
DistinguishedName : CN=user1\0ADEL:7b24079e-06a8-4d98-9566-e9e9454676c6,CN=Dele
ted Objects,DC=contoso,DC=com
Name : user1
DEL:7b24079e-06a8-4d98-9566-e9e9454676c6
ObjectClass : user
ObjectGUID : 7b24079e-06a8-4d98-9566-e9e9454676c6
4、還原刪除的容器或OU或使用者:
(如果有一個包含使用者的OU需要還原,必須先還原OU,然後再還原使用者)
Restore-ADobject -Identity 610b87d9-77e4-48be-8b1d-dbd58ca9d7c8
Restore-ADobject -Identity 7b24079e-06a8-4d98-9566-e9e9454676c6
還原成功,Ou Yeh!
本文出自 “繁星點點” 部落格,請務必保留此出處http://fanxing.blog.51cto.com/189800/1954789
【經驗分享】Windows 2008 R2活動目錄資源回收筒