【經驗分享】Windows 2008 R2活動目錄資源回收筒

來源:互聯網
上載者:User

標籤:啟用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活動目錄資源回收筒

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.