Hide Updates Using Batch Script in Windows 11


FreeBooter

Well-known member
Pro User
VIP
Local time
1:46 AM
Posts
3,923
OS
Windows 11
Microsoft, for some reason, decided to give us fewer options to manage Windows updates. While there isn’t an easy-peasy checkbox to hide an update anymore, you can hide Windows updates using this batch script in Windows.

Batch:
@Echo off & Cls

(Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)


:_CHOICE

Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo        1 - Hide Windows Updates
Echo.       
Echo        2 - Unhide Windows Updates
Echo.


Set /p input=:^>

If Not %input%==1 (Goto :_Ex) Else (Goto :_Hide)

:_Ex
If Not %input%==2  (Goto :_CHOICE) Else (Goto :_Unhide)




:_Hide

Cls & Mode CON  LINES=30 COLS=90 & Color 0E & Title Created By FreeBooter

powershell Set-Executionpolicy unrestricted

Cls

PowerShell Install-Module PSWindowsUpdate

Cls

PowerShell Get-WindowsUpdate

Echo.
Echo.
Echo Enter KBNUMBER with the update number you want to block

Set /p KBNUMBER=:^>

Cls

PowerShell Hide-WindowsUpdate -KBArticleID %KBNUMBER% -AcceptAll


ping -n 5 localhost > Nul


Goto :_CHOICE





:_Unhide

Cls & Mode CON  LINES=30 COLS=90 & Color 0E & Title Created By FreeBooter

powershell Set-Executionpolicy unrestricted

Cls

PowerShell Install-Module PSWindowsUpdate


Cls

PowerShell Show-WindowsUpdate

Echo.
Echo.
Echo Enter KBNUMBER with the update number you want to Unhide

Set /p KBNUMBER=:^>

Cls

PowerShell Show-WindowsUpdate -KBArticleID %KBNUMBER% -AcceptAll


ping -n 10 localhost > Nul

Goto :_CHOICE
 

Attachments

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

Latest Support Threads

Back
Top Bottom