Sorry, search feature is not supported in Internet Explorer 11

Enabling and disabling security roles

The following code sample shows how to enable and disable a security role.


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

# Bind to the security role
$securityRolesPath = $admService.Backend.GetConfigurationContainerPath( `
$securityRolesPathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" `
$roleAdsPath = $securityRolesPathObj.CreateChildPath("CN=My Role")
$role = $admService.OpenObject($roleAdsPath, $NULL, $NULL, 0)

# Enable the role
$role.Disabled = $False

# Disable the role
$role.Disabled = $True

See also