PowerShell Tip: Create an Organizational Unit with PowerShell

In Windows Server 2016, Windows Server 2012 R2 or Windows Server 2008 R2, use the New-ADOrganizationalUnit cmdlet to create an Organizational Unit.

To create a new OU at the root of Active Directory called “Organization”:

NEW-ADOrganizationalUnit "Organization"

If it needs to exist in different path in Active Directory, specify the path by its distinguished name:

NEW-ADOrganizationalUnit "Organization" –path "OU=Offices,DC=testlab,DC=local"
Advertisements

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