How in bulk disable “Protect from accidental deletion” in AD

sample, how to untick/disable attiribute “Protect from accidental deletion” 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 $_}
Read the rest

How to report in Active Directory all protected users

If you use ManageEngine ADmanager Plus then some your manual operations or automations can fail due to the “Protect from accidental deletion”. In this case it’s very useful to determine who has already this attribute enabled:

Get-ADuser -Filter * -Properties * | select-object name, samaccountname,enabled, ProtectedFromAccidentalDeletion | export-csv -path c:\temp\protection-status.csv -NoTypeInformation

if you need to disable this attribute pls visit my other post

 … Read the rest