to verify if your OUs are protected from accidental deletion use:
Get-ADOrganizationalUnit -Filter * -Properties * |Select-Object DistinguishedName, ProtectedFromAccidentalDeletion
to protect all OUs in AD from accidental deletion use:
Get-ADOrganizationalUnit -Filter * | Set-ADObject -ProtectedFromAccidentalDeletion:$true
No comments:
Post a Comment