Sorry, search feature is not supported in Internet Explorer 11

Renaming Organizational Units

The following code sample renames an Organizational Unit.


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

# Bind to the Organizational Unit
$ouDN = "OU=My OU,DC=domain,DC=com"
$ou = $admService.OpenObject("Adaxes://$ouDN", $NULL, $NULL, 0)

# Rename the Organizational Unit
$ou.Put("name", "New Name")
Import-Module Adaxes

$identity = "OU=My OU,DC=domain,DC=com"  # DN
# $identity = "{EB5FEB21-E648-42AD-B86C-89D3C6807953}" # GUID

Rename-AdmObject -Identity $identity -NewName "New Name" `
    -Server "" -AdaxesService localhost

See also