Category filter
Script to download and install OS updates
It is imperative to download and install OS updates released by Microsoft as these updates might fix bugs and security flaws in your system. Using Hexnode, you can deploy scripts and effortlessly update the Windows devices to latest version.
Batch Script
1 2 3 4 |
usoclient ScanInstallWait usoclient StartInstall timeout /t time _to_wait_in seconds usoclient RestartDevice |
The usoclient.exe commands do not provide any feedback on the terminal when executed manually or on the Hexnode portal if the script is deployed through the portal. The only way to ensure that the commands are working is to check if the updates are being downloaded under Settings > Windows Update on the devices.
Powershell Script
1 |
Install-WindowsUpdate -ForceDownload -ForceInstall – AcceptAll |
To use this command, the device must have PSWindowsUpdate module. To install the module silently,
1 |
Install-Module PSWindowsUpdate Install-PackageProvider NuGet –Force Set-PSRepository PSGallery -InstallationPolicy Trusted Install-Module SQLServer -Repository PSGallery |