Creating and Customizing Automation Policies

This section describes how to create automation policies using the automation actions in Microsoft Automation PowerPacks.

Prerequisites

Before you create an automation policy using the automation actions in Microsoft Automation PowerPacks, you must determine:

  • Which set of commands you want to run on a monitored device when an event occurs. There are ten automation actions in the PowerPack that run the "Execute PowerShell Request" action type with different commands. You can also create your own automation actions using the custom action type supplied in the PowerPack.
  • What event criteria you want to use to determine when the automation actions will trigger, or the set of rules that an event must match before the automation is executed. This can include matching only specific event policies, event severity, associated devices, and so on. For a description of all the options that are available in Automation Policies, see the Run Book Automation section.

Creating an Automation Policy

To create an automation policy that uses the automation actions in Microsoft Automation PowerPacks, perform the following steps:

  1. Go to the Automation Policy Manager page (Registry > Run Book > Automation).

  1. Click Create. The Automation Policy Editor page appears.

  1. Complete the following required fields:
    • Policy Name. Enter a name for the automation policy.
    • Policy Type. Select whether the automation policy will match events that are active, match when events are cleared, or run on a scheduled basis. Typically, you would select Active Events in this field.
    • Policy State. Specifies whether the policy will be evaluated against the events in the system. If you want this policy to begin matching events immediately, select Enabled.
    • Policy Priority. Specifies whether the policy is high-priority or default priority. These options determine how the policy is queued.
    • Organization. Select one or more organizations to associate with the automation policy. The automation policy will execute only for devices in the selected organizations (that also match the other criteria in the policy). To configure a policy to execute for all organizations , select System without specifying individual devices to align to.

    • Aligned Actions. This field includes the actions from the PowerPack. To add an action to the Aligned Actions field, select the action in the Available Actions field and click the right arrow (>>). To re-order the actions in the Aligned Actions field, select an action and use the up arrow or down arrow buttons to change that action's position in the sequence.

      You must have at least two Aligned Actions: one that runs the automation action and one that provides the output format. The actions providing the output formats are contained in the Datacenter Automation Utilities PowerPack, which is a prerequisite for running automations in this PowerPack.

      If you are selecting multiple collection actions that use the "Execute PowerShell Request" action type, you may want to include the “Calculate Memory Size for Each Action” automation action, found in the Datacenter Automation Utilities PowerPack, in your automation policy.

  2. To align the policy with the Windows Automation device group, which is supplied in the PowerPack, do the following:
    1. In the Align With drop-down menu, select "Device Groups".
    2. In the Available Device Groups field, select, the "Windows Automation" device group, and click the right arrow (>>).
  3. Optionally, supply values in the other fields on this page to refine when the automation will trigger.
  4. Click Save.

    You can also modify one of the automation policies included with this PowerPack. Best practice is to use the [Save As] option to create a new, renamed automation policy, instead of customizing the standard automation policies.

    If you modify one of the included automation policies and save it with the original name, the customizations in that policy will be overwritten when you upgrade the PowerPack unless you remove the association between the automation policy and the PowerPack before upgrading.

Customizing an Automation Policy

To customize an automation policy:

  1. Go to the Automation Policy Manager page (Registry > Run Book > Automation).

  1. Search for the automation policy you want to edit and click the wrench icon () for that policy . The Automation Policy Editor page appears.

  1. Complete the following fields as needed:
  • Policy Name. Type a new name for the automation policy to avoid overwriting the default policy.
  • Policy Type. Select whether the automation policy will match events that are active, match when events are cleared, or run on a scheduled basis. Typically, you would select Active Events in this field.
  • Policy State. Specifies whether the policy will be evaluated against the events in the system. If you want this policy to begin matching events immediately, select Enabled.
  • Policy Priority. Specifies whether the policy is high-priority or default priority. These options determine how the policy is queued.
  • Aligned Actions. This field includes the actions from the  PowerPack. You should see "Execute Remote PowerShell Request" action in this field. To add an action to the Aligned Actions field, select the action in the Available Actions field and click the right arrow (>>). To re-order the actions in the Aligned Actions field, select an action and use the up arrow or down arrow buttons to change that action's position in the sequence.

    You must have at least two Aligned Actions: one that runs the automation action and one that provides the output format. The actions providing the output formats are contained in the Datacenter Automation Utilities PowerPack, which is a prerequisite for running automations in this PowerPack.

  • Organization. Select the organization that will use this policy.

  1. To align the policy with the Windows Automation device group, which is supplied in the PowerPack, do the following:
    1. In the Align With drop-down menu, select "Device Groups".
    2. In the Available Device Groups field, select, the "Windows Automation" device group, and click the right arrow (>>).
  1. Optionally, supply values in the other fields on this page to refine when the automation will trigger.
  2. Click Save.

    You can also modify one of the automation policies included with this PowerPack. Best practice is to use the [Save As] option to create a new, renamed automation policy, instead of customizing the standard automation policies.

    If you modify one of the included automation policies and save it with the original name, the customizations in that policy will be overwritten when you upgrade the PowerPack unless you remove the association between the automation policy and the PowerPack before upgrading.

  1. Optionally, supply values in the other fields on the Automation Policy Editor page to refine when the automation will trigger.
  2. Click Save As.

Removing an Automation Policy from a PowerPack

After you have customized a policy from a  PowerPack, you might want to remove that policy from that PowerPack to prevent your changes from being overwritten if you update the PowerPack later. If you have the license key with author's privileges for a PowerPack or if you have owner/administrator privileges with your license key, you can remove content from a PowerPack.

To remove content from a PowerPack:

  1. Go to the PowerPack Manager page (System > Manage > PowerPacks).
  2. Find the  PowerPack. Click its wrench icon ().
  3. In the PowerPack Properties page, in the navigation bar on the left side, click Run Book Policies.
  4. In the Embedded Run Book Polices pane, locate the policy you updated, and click the bomb icon () for that policy. The policy will be removed from the PowerPack and will now appear in the bottom pane.