Avatar of Parity123
Parity123
Flag for United States of America

asked on 

Powershell: Protect from accidental deletion script

Hello All,

I have the following oneliner script:

$domaindn="dc=abc,dc=com"
Get-ADOrganizationalUnit -server abc.com -SearchBase "$domaindn" -Searchscope 1 -filter * -properties ProtectedFromAccidentalDeletion | set-adobject  -ProtectedFromAccidentalDeletion:$true

I am getting the following error:
"This access control list is not in canonical form and therefore cannot be modified"

Please help.

Regards,
Powershell

Avatar of undefined
Last Comment
footech

8/22/2022 - Mon