Protect object from accidental deletion

From AlphaBook
Jump to: navigation, search

Check from ADUC

  • In Active Directory User and Computer, we may need to click View->Advanced Features, in order to check this setting for OU or user account

Using powershell

  • Set-ADObject -Identity "OU=User Accounts,DC=corp,DC=alphabook,DC=cn" -ProtectedFromAccidentalDeletion $true
  • Set-ADObject -Identity "CN=Terry Shen,OU=User Accounts,DC=corp,DC=alphabook,DC=cn" -ProtectedFromAccidentalDeletion $true