3.1 AD Knowledge Script Job Delegation

Some Knowledge Scripts in the AD category include an optional “job delegation” feature that automatically determines where a monitoring job should run.

Use job delegation to select the server role that should run the job. If the role-holder changes, an event is raised, and the job is delegated to the server that now holds the selected role. Forest-wide monitoring can be delegated to the Schema Master or Domain Master. Domain-wide monitoring can be delegated to the Relative ID (RID) master, the Primary Domain Controller (PDC), or the infrastructure master (IM). Site-wide monitoring can be delegated to the Inter-Site Topology Generator (ISTG).

For example, to run a Knowledge Script job on all servers in the forest that have the Domain Master role, enable job delegation and then deploy the script to all domain controllers (DCs) in the forest. The job will run only on the DC that is currently holding the Domain Master role. Anytime a DC relinquishes or assumes that role, an event informs you of the change. But the job continues to run according to its schedule, automatically delegating the monitoring tasks only to servers holding the Domain Master role. To achieve complete coverage, include all DCs in your forest when deploying the script.

Use the job delegation feature instead of selecting and re-selecting the DCs for a Knowledge Script job. Instead of re-deploying the script every time a server role changes, you can select a regular schedule and deploy the script once. The script then automatically runs only on the DCs holding a certain server role. You can also avoid creating special server groups to deploy scripts to, say, a DC from every domain. Instead, you can enable job delegation and run the script on all DCs in the forest. The job will run only on DCs holding the server role you selected — one per domain — not on every DC in the forest.

Included as part of the recommended Knowledge Script Groups (KSGs) in AppManager for Active Directory is a KSG named “AD” that uses the job delegation feature. For more information, see Section 3.51, AD.

Job delegation works because the script itself determines if each server you run the script on is holding the role you selected for the Delegate monitoring to the [Active Directory server role] parameter. If a server is no longer holding that role, the script does the following:

  • Raises an event notifying you of the change.

  • Forces monitoring on that server to sleep for that schedule interval.

The DC that assumes the selected server role then performs the monitoring job.

The Knowledge Script job delegation feature also allows and event to be raised when a DC assumes the selected server role.

The following scripts offer job delegation: