Forum Discussion
FahimiBnd
Mar 18, 2023Copper Contributor
check windows update through a batch file
Hello my loptop brand is Asus Zenbook and windows edtition is Microsoft Windows 11 Home OS Version: 10.0.22000 N/A Build 22000 i want a script file to check my windows update automatically if i...
Reza_Ameri
Mar 18, 2023Silver Contributor
You don't need any batch file because by default whenever you connect to internet, Windows will automatically check for update and download and install it. You may run a quick test and just stay connect to internet without checking for update and you will see Windows will asking for update and you should see installed updates in the Windows Update history.
However, in case you are looking for script to do checking, it is easier to do it with Windows PowerShell.
You may open Windows PowerShell as administrator and then first import the Windows Update library with the following command:
Install-Module PSWindowsUpdate
The run the following command to check for update
Get-WindowsUpdate
And finally use the following command to install it:
Install-WindowsUpdate
However, in case you are looking for script to do checking, it is easier to do it with Windows PowerShell.
You may open Windows PowerShell as administrator and then first import the Windows Update library with the following command:
Install-Module PSWindowsUpdate
The run the following command to check for update
Get-WindowsUpdate
And finally use the following command to install it:
Install-WindowsUpdate