# Erstelle OU in OUS
$ous = @(("IT_Entwicklung","Essen"),("IT_Test","Bochum")) foreach($ou in $ous) { $newou = New-ADOrganizationalUnit -Name $ou[0] -Path "OU=ORG,DC=ndsedv,DC=de" -Description $ou[1] -ProtectedFromAccidentalDeletion $false -PassThru $ouGroups=New-ADOrganizationalUnit -Name "Gruppen" -Path $newou.DistinguishedName ` -Description "Gruppen" ` -ProtectedFromAccidentalDeletion $false -PassThru }
Download Skript: