Sorry, search feature is not supported in Internet Explorer 11

Deprovisioning user accounts

The following code sample executes the built-in custom command Deprovision for a user account.


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

# Bind to the user
$userDN = "CN=John Smith,CN=Users,DC=company,DC=com"
$user = $admService.OpenObject("Adaxes://$userDN", $NULL, $NULL, 0)

# Execute custom command
$commandID = "{9DB88EC3-1241-4AB1-9612-C7C982BAA49F}" # Deprovision


For information on how to get the identifier of a custom command, see Get custom command identifier.

See also