Windows 2008 R2 Powershell AD Cmdlets

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.

Get-ADOrganizationalUnit

Helps to get the details of the required OU

Set-ADOrganizationalUnit

Helps to modify the OU

Remove-ADOrganizationalUnit

Helps to remove the required OU

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s