Protect object from accidental deletion

From AlphaBook
Revision as of 14:14, 14 October 2017 by Admin (talk | contribs) (Using powershell)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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