Created
February 10, 2015 15:40
-
-
Save iqwirty/2599e2e3d2597525448d to your computer and use it in GitHub Desktop.
Create a parent organizational unit and some children
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a parent organizational unit and some children | |
Import-Module ActiveDirectory | |
# Create the parent in dc=domain,dc=net | |
New-ADOrganizationalUnit "ParentOU" | |
# Create the children | |
1..10 | % ` | |
{ | |
New-ADOrganizationalUnit -Name "ChildOU$_" -Path "ou=ParentOU,dc=domain,dc=net" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment