Skip to main content

Windows Update - Repair

Summary

This script attempts to repair and reset Windows update settings using the ProVal script: Repair-WindowsUpdate
The goal of this script is to fix potential patching issues for Windows devices.

Sample Run

Sample Run

Dependencies

Repair-WindowsUpdate

Global Parameters

NameExampleDescription
EmailSomeone@somewhere.comThe email address of the recipient for any failed run of the script.
TicketOnFailure-G1 or anything else1 will enable ticketing on failure; anything else disables this feature.
TicketCreationCategory178The ticket creation category for the created ticket.

User Parameters

NameExampleRequiredDescription
SfcScan1False1 to execute SFC Scan as well; leave it blank to skip SFC Scan.
TicketOnFailure1 or anything elseFalse1 will enable ticketing on failure; anything else will disable this feature.
DISMRepair1False1 to execute the DISM repair task with the windows patch component reset

Process

Executes the Agnostic script Repair-WindowsUpdate Attempts to remove the SoftwareDistribution.old and catroot2.old directories if new SoftwareDistribution and catroot2 directories are created. Reset the Windows update components. Logs successes and failures accordingly. If the script fails to repair the device, it will verify the global variable settings and notify as configured.

Note: Please whitelist the below filehash in the security application for the PowerShell successful execution:

1D7C348C9B7C33C0FA677713A19A992E D056A7921569BF0E637AC8EBF03D0DC5

Output

  • Script Logs