Link to home
Create AccountLog in
Avatar of Parity123
Parity123Flag 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,
SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.