sample, how to untick/disable attiribute &#8220;Protect from accidental deletion&#8221; in bulk/batch for whole OU It can be useful to be able to move, delete ADobjects using powershell, ADManager $searchb02 = "OU=Disabled Users,DC=itforce,DC=local" Get-ADObject -Filter * -SearchBase $searchb02 |ForEach-Object -Process {Set-ADObject -ProtectedFromAccidentalDeletion $false -Identity $_}{"id":1498,"date":"2020-03-28T18:30:13","date_gmt":"2020-03-28T10:30:13","guid":{"rendered":"https:\/\/www.itforce.mn\/?p=1498"},"modified":"2020-03-28T19:21:56","modified_gmt":"2020-03-28T11:21:56","slug":"1498","status":"publish","type":"post","link":"https:\/\/www.itforce.mn\/index.php\/2020\/03\/28\/1498\/","title":{"rendered":"How in bulk disable &#8220;Protect from accidental deletion&#8221; in AD"},"content":{"rendered":"<p>sample, how to untick\/disable attiribute &#8220;Protect from accidental deletion&#8221; in bulk\/batch for whole OU<\/p>\n<p>It can be useful to be able to move, delete ADobjects using powershell, ADManager<\/p>\n<pre>$searchb02 = \"OU=Disabled Users,DC=itforce,DC=local\"\r\nGet-ADObject -Filter * -SearchBase $searchb02 |ForEach-Object -Process {Set-ADObject -ProtectedFromAccidentalDeletion $false -Identity $_}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":null,"protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,17],"tags":[],"class_list":["post-1498","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-powershell-tips"],"_links":{"self":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/1498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/comments?post=1498"}],"version-history":[{"count":4,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/1498\/revisions"}],"predecessor-version":[{"id":1502,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/1498\/revisions\/1502"}],"wp:attachment":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/media?parent=1498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/categories?post=1498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/tags?post=1498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}