Sometimes Microsoft releases a bad update via Windows Update. It might be 3035583 that has been released multitple times to to push Windows 10 nag prompts to users. Or 3097877 that causes Outlook to crash repeatedly.
Here is a PowerShell script that uses wusa.exe to uninstall an update, then PowerShell to hide that same update. It will even check for superseded updates with the same number and hide those. The script was designed to run from the MaxFocus dashboard but can also be run standalone.
Copy the text below and save as WindowsUpdate.UninstallAndHideUpdates.ps1.
Provide as the first parameter a list of one or more numeric KB IDs to be uninstalled and hidden, separated by commas without spaces. For example:
As always, use at your own risk!
These screen shots show the script deployed as an Automatic Task to MaxFocus, with results.
And here’s the script:
<# .Synopsis Check whether an update is installed and if so, uninstall it. Check whether the same update is hidden and if not, hide it. Note that the check for pending updates can take several minutes. Copyright (c) 2019 by MCB Systems. All rights reserved. Free for personal or commercial use. May not be sold. No warranties. Use at your own risk. .Notes Name: MCB.WindowsUpdate.UninstallAndHideUpdates.ps1 Author: Mark Berry, MCB Systems Created: 10/11/2015 Last Edit: 01/26/2019 Adapted from: