PowerShell – protect objects from accidental deletion
Posted by chrisbeams on March 10, 2010
Using PowerShell V2 and the new AD Cmdlets
in the below example on an OU
Get-ADOrganizationalUnit -filter * | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true
and to do the reverse to one OU
Set-ADOrganizationalUnit “OU=London,DC=W2K8R2,DC=NET -ProtectedFromAccidentalDeletion $False
Episode 106 – SQL PSX with Chad Miller « PowerScripting Podcast said
[...] Protect objects from accidental deletion with PowerShell [...]