Sorry, search feature is not supported in Internet Explorer 11

Enabling and disabling business rules

The following code sample shows how to enable and disable a business rule.


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

# Bind to the business rule
$businessRulesPath = $admService.Backend.GetConfigurationContainerPath(
$businessRulesPathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" `
$myRuleAdsPath = $businessRulesPathObj.CreateChildPath( `
    "CN=My Rule")
$rule = $admService.OpenObject($myRuleAdsPath, $NULL, $NULL, 0)

# Enable the business rule
$rule.Disabled = $False

# Disable the business rule
$rule.Disabled = $True

See also