Repair-WindowsUpdate
Description
This script is used to reset Windows Update settings.
🚨 This script is provided "without warranty." 🚨
Running the script may not necessarily resolve any issues with Windows updates. It simply attempts to reset Windows Update settings.
🚨 YOU HAVE BEEN WARNED 🚨
Requirements
- PowerShell v5
- Must be executed as an administrator
- Windows must be licensed
Usage
- Stop the services related to Windows updates.
- Perform a System File Check.
- Rename cache directories for Windows Update.
- Reset the Windows Component by installing the PSWindowsUpdate module.
- Start the services related to Windows updates.
- It provides optional feature of sfcscan and dism repair.
- Log any failures to the error log.
Attempt to reset Windows Update settings as a primary troubleshooting step for Windows Update issues.
.\Repair-WindowsUpdate.ps1
Attempt to reset Windows Update settings as a primary troubleshooting step, with an optional SFC scan or dism repair or both, for Windows Update issues.
.\Repair-WindowsUpdate.ps1 -SFCScan
.\Repair-WindowsUpdate.ps1 -DISMRepair
.\Repair-WindowsUpdate.ps1 -SFCScan -DISMRepair
Parameters
Parameter | Alias | Required | Default | Type | Description |
---|---|---|---|---|---|
-SFCScan | False | Switch | Toggles an optional SFC scan as a repair option for Windows updates. | ||
-DISMRepair | False | Switch | Toggles an optional DISM repair |
Output
Location of output for log, result, and error files:
.\Reset-WindowsUpdates-log.txt
.\Reset-WindowsUpdates-error.txt