Widows 2008 R2 comes with powershell v2 by default. and added with 76 new Ad cmdlets and Ad provders
New-ADOrganizationalUnit -Name “OUname” -ProtectedFromAccidentalDeletion $true
This command creates new OU under the root. If we wanted created OU in specific path then we have to provide the pat. Below is the example of the same
New-ADOrganizationalUnit -Name “OUname” -Path “OU=AllUsers,dc=grayson,dc=test” -ProtectedFromAccidentalDeletion $true
-ProtectedformAccidentDeletion $true help to protect the OU getting accidentially deleted.
Helps to get the details of the required OU
Helps to modify the OU
Helps to remove the required OU