Uninstall Windows Updates
Custom PowerShell Script to uninstall Windows Updates.
Last updated
Custom PowerShell Script to uninstall Windows Updates.
Last updated
The following is the Uninstall Windows Update KB 5000802 sample PowerShell script. Copy it and save it as a .ps1 file or download it from here
Note that this example is specific to KB 5000802; you will need to replace the Patch KB Number with the Patch KB Number of the Windows Update that you wish to uninstall.
1. Edit the script to replace the Patch KB Number (5000802 in the example above) with the Patch KB Number to be uninstalled.
2. Optional: Remove /forcerestart from the script to prevent an instant restart.
3. Save the script as a .ps1 file.
4. Self-host the script - see .
The table below outlines all the fields that need to be set when creating this custom script.
Field
Value
Name
Uninstall Windows Update KB 5000802
URL
Type
PowerShell
Command-Line
Leave blank
Run As
System Account or Specified User Account
1. Select the Control Grid tab on the top menu bar.
2. Navigate to the Applications tab.
3. Click CUSTOM SCRIPT.
4. Select Create Custom Script.
5. Enter a Name for the script; Uninstall Windows Update KB 5000802 in this example; use any name you'd like to use.
Please note this example URL is specific to KB 5000802; you will need to download and edit the script replacing the Patch KB number, and self-host it if you haven't already done so.
7. Select the script type: Powershell.
8. Command Line: Leave blank.
9. Select the account to Run As; either System Account or Specified User Account.
10. Click SAVE TO GRID.
The script will now appear in the list of Custom Scripts. It will also be available to select from the Applications Control Grid View.
Search for the script in the grid using the search option. If your applications are grouped, you will see a column named Custom Scripts. Selecting the Custom Script header will display all the scripts that have been added to the grid.
Please note this example URL is specific to KB 5000802; you will need to download and edit the script replacing the KB number and self-host if you haven't already done so (see for further info).
6. Enter the URL that points to the hosted script in this example.
You can self-host for free using GitHub. See the for further information.
For a guide on how to run your custom script, see .