Sorry, search feature is not supported in Internet Explorer 11

Enabling and disabling custom commands

The following code sample shows how to enable and disable a custom command.


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

# Bind to the custom command
$customCommandsPath = $admService.Backend.GetConfigurationContainerPath(
$customCommandsPathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" `
$myCustomCommandAdsPath = $customCommandsPathObj.CreateChildPath( `
    "CN=My Command")
$myCustomCommand = $admService.OpenObject($myCustomCommandAdsPath, $NULL, $NULL, 0)

# Enable the custom command
$myCustomCommand.Disabled = $False

# Disable the custom command
$myCustomCommand.Disabled = $True

See also