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.

Files Hash

Potential File Name: C:\ProgramData\_automation\script\Repair-WindowsUpdate\Repair-WindowsUpdate-AI.ps1
File Hash (Sha256): 3F873CB313BAD5077DF1D9DF112E2420749AA7311E89866850D4B16F8A089C98
File Hash (MD5): 4787A5FD35BE02D086CB5732D84018C2

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.

Output

  • Script Logs