Sorry, search feature is not supported in Internet Explorer 11

Enabling and disabling scheduled tasks

The following code sample shows how to enable and disable a scheduled task.


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

# Bind to the scheduled task
$scheduledTasksPath = $admService.Backend.GetConfigurationContainerPath(
$scheduledTasksPathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" `
$myScheduledTaskAdsPath = $scheduledTasksPathObj.CreateChildPath( `
    "CN=My Task")
$myScheduledTask = $admService.OpenObject($myScheduledTaskAdsPath, $NULL, $NULL, 0)

# Enable the scheduled task
$myScheduledTask.Disabled = $False

# Disable the scheduled task
$myScheduledTask.Disabled = $True

See also