How do I create an Automation Policy to show Patch Management Agents Re-Running Software Updates?

book

Article ID: 179736

calendar_today

Updated On:

Products

Patch Management Solution for Windows

Issue/Introduction

 

Resolution

Question
How do I create an Automation Policy to show Patch Management Agents Re-Running Software Updates?

Answer
Work through the following steps to create the Automation Policy for the data required:

Go to the Console > Manage > Policies > Automation Policies

 

Step 1: Create new automation policy

·         Select the New Policy Icon on the tool bar

o   Name the New Policy: Patch Management Agents Re-Running Software Updates

 


Step 2: Select the new policy from the list "Patch Management Agents Re-Running Software Updates" if it doesn't already show up for you.

·         Edit Query (under the Details for the "Data Source" and Select "Raw SQL Query" for the Data source type in the drop-down list).

 

 


Step 3:
Input the Parameters for the Data Source as follows

A: Parameterised Query Tab: Input the SQL Script below (Case Sensitive)

 

set rowcount 0; exec dbo.prAgentsReRunningSoftwareUpdateInstallation    

  @pComputer = '%',    

  @pBulletin = '%',    

  @pNDays = '7',    

  @pMinEvents = '2'

 

Note: The Parameters were pulled directly from this Policy in version 6.X, and they can be changed according to what you desire.



          B: Query Parameters Tab: Select the Add button and input each individual Parameter.

Each of the following will need to be added as a new 'Name' and values for each of the items listed below will need to be added for each new 'Name' by working through the following:

                   pComputer     

                   pBulletin     

                   pNDays     

                   pMinEvents

 

·         Name – Name of the parameter (i.e. pComputer)

·         Description – Describe the parameter

·         Type – The following show the values for the Name / Type

·         For 'pComputer' and 'pBulletin', Use 'Basic String Parameter' from the drop-down list. 

·         For 'pNDays' and 'pMinEvents', use  'Basic Int32 Parameter' from the drop-down list.

·         Default Value – Input value to run for notification for instance 'pComputer' would be '%', 'pBulletin' is '%', 'pNDays' is '7', and  'pMinEvents' is '2' (These values for the ones used in the Notification server 6 version).

 

·         Test Value – Input value to run on Test (you can use the same values as above in the "Default Value" if you want).

 

·         The Parameter Required box Needs to be "Checked"

 

·         Display / Eval Order – Didn’t appear to place in the numerical order (The defaults here should be fine unless you want to change the order they display in).



            C: Data Snapshots Tab: In the 'Available Guid Fields' highlight the '_ResourceGuid' option and press the 'Scope' button to add that Data Source. This will move the  the '_ResourceGuid' to the 'Scoping Guid Fields'.

 

            D: Check the Resolved Query and Results Tabs: see if the parameters work

Step 4: Configure the desired Automated Policy Task to notify an email address etc.

  • Manage > Jobs and Tasks > System Jobs and Tasks > Notification Server > Automation Policy Tasks



Step 5: Input the Action to take place when the SQL Script has run with the paramaters.



Step 6: Edit Input Parameters: Provide a value for each drop down listed under this heading

  • REPORTURL: Data Source: Results as HTML to provide the link to the report in the email
  • REPORTNAME: Data Source: Results as text to inform in the email
  • POLICYNAME: Data Source: Results as text to inform in the email
  • SERVERNAME: Data Source: Results as text to inform in the email



            Note: The SQL Script and Parameters can be pulled from any Automated Policy from version 6.X. However, the test environment this was setup in has no machines with this issue, so the parameters were not able to be tested. The parameters may need to be adjusted with the change made in version 7.0. Please review KB 51412, 48458 and 44970, for they may further assist with working through this setup.

Attachments