Skip to main content

Repair Failing Patch Scans

Summary

This script is an Autofix script meant to be called from the monitor ProVal - Development - Last scanned patch date > 7 days.

Sample Run

This script was designed to be called from a monitor.

To run this script manually, please see the screenshots below.

Screenshot

In the Advanced Settings → Parameters area, please enter the following string of text:

@status@=FAILED

Screenshot

This will allow the script to be run manually instead of being called by the monitor.

Dependencies

This Autofix script is called by the monitor ProVal - Development - Last scanned patch date > 7 days.

Variables

  • %lastcmdoutput% - This variable is used to review the data returned from the Resend Patch information commands.

Process

  1. The script will first verify the status of the monitor (or the parameter used to run manually mentioned above) and, if the patch scan was successful, will simply exit the script.
  2. If the monitor is still in a failed state, the monitor will attempt to resend patches.
  3. If the patch scan returns properly, the script will exit with a log message indicating the issue has been resolved.
  4. If the patch scan fails again, the script will take the following actions:
    1. Set the WUAUSERV to "AutoStart."
    2. Start the WUAUSERV service.
    3. Attempt to scan for patches again.
  5. The script will then verify if the patch scan is working properly. If the command completes successfully, the script will exit. If the command fails, the script will exit with an error.

Output

  • Script log messages only.
  • Please reach out to support@provaltech.com if you would like this solution to begin ticketing.