Get-ADOrganizationalUnit -Filter * -Properties * | Select-Object name , ProtectedFromAccidentalDeletion
to protect all your organizational unit objects use:
Get-ADOrganizationalUnit -filter * | Set-ADObject -ProtectedFromAccidentalDeletion:$true
users can also be protected using:
Get-ADObject -filter {(ObjectClass -eq "user")} | Set-ADObject -
No comments:
Post a Comment