Sorry, search feature is not supported in Internet Explorer 11

Creating Organizational Units

The following code sample creates an Organizational Unit in Active Directory.


# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# bind to the domain
$domainDN = "DC=domain,DC=com"
$domain = $admService.OpenObject("Adaxes://$domainDN", `
    $NULL, $NULL, 0)

# Create a new Organizational Unit
$ou = $domain.Create("organizationalUnit", "OU=New Organizational Unit")
Import-Module Adaxes

$domainDN = "DC=domain,DC=com"

New-AdmOrganizationalUnit -Name "New Organizational Unit" -Path $domainDN `
    -Server "" -AdaxesService localhost

See also