Protecting All OUs in the Domain from Accidental Deletion
This topic explains how to use the Active Directory module for Windows PowerShell to protect all organizational units (OUs) in the domain from accidental deletion.
Example
The following example demonstrates how to protect all OUs in the Fabrikam.com domain from accidental deletion:
Get-ADOrganizationalUnit -Filter 'Name -like "*"' | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true
Get-ADOrganizationalUnit -Filter 'Name -like "*"' | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true
Additional information
In addition to the standard Lightweight Directory Access Protocol (LDAP) attributes, you can retrieve the following extended properties of the Get-ADOrganizationalUnit cmdlet by using the -Properties parameter:
- StreetAddress
- City
- State
- Country
- PostalCode
- Description
- DisplayName
- ProtectedFromAccidentalDeletion
- AppliedGroupPolicies
- Country
- City
- PostalCode
- State
- StreetAddress
- Description
- DisplayName
- ProtectedFromAccidentalDeletion
- ManagedBy
No comments:
Post a Comment