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.


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Batch Script

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

To use this command, the device must have PSWindowsUpdate module. To install the module silently,


  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository