Using PowerShell Script to Manage the Windows 10 Update Policy


The main objective of this article is to provide step-by-step instructions on how to use PowerShell script to set and modify the Windows update policy using a Windows bundle. The Windows 10 update settings can be easily re-configured using this bundle.

This document includes the following information:

  • Prerequisites

  • Creating the Bundle

  • Deploying the Bundle

  • Logging Results


Prior to deploying the bundle, you need be aware of the following:

  • The Windows bundle can be deployed only on Windows 10 devices.

  • Using the bundle, you can modify the update settings for Windows 10 devices. However, if the same setting is controlled by a group policy, the latter will prevail.

  • Prior to deploying the bundle, you must enable script execution by running the following command: Set-ExecutionPolicy <Unrestricted / AllSigned/ RemoteSigned>).

By default, the value set as Restricted.

Creating the Bundle

To create the Windows bundle:

  1. In ZENworks Control Center, create a Windows bundle and add the modifyWindowsUpdateConfiguration.ps1, the settings.xml and the Setupconfig.ini files. For the Setupconfig.ini file, ensure that you specify the Destination Directory as %systemdrive%\Users\Default\AppData\Local\Microsoft\Windows\WSUS\

For information on how to create Windows bundles, see

  1. In the Bundles page, click the bundle that was created in the previous step and click Actions > Launch.

  • Click the Run Script Action link and in the Edit Action – Script dialog, specify the Action Name, Script File Name, Script Parameters and Path to Script Engine.

  • Click the Advanced tab and select the Run as secure system user (Don’t allow system to interact with desktop)

For information on Bundle Actions, see

  1. After specifying the relevant values, click OK and then Publish the bundle.

Note: While creating the bundle, ensure that the path for the install files is correct and it is the same as that specified in the run script.

Deploying the Bundle

To deploy the bundle, assign the bundle to the specific users or devices and specify the deployment schedule. After the bundle is deployed, the required settings will be modified based on the settings.xml file.

For information on how to assign bundles, see

Logging Results

Results of the script execution can be viewed in the %ZENworks_home%/logs/windowsUpdateConfigurationLog file. In this file you can view the settings that have been successfully set and those which could not be set due to errors.

The log file will also include the updated policy settings.

The relevant script code and required files are present in the below pdf:

PowerShell Script to Manage Windows 10 updates Policy_With_Neccessary_Files_Attached

The required files are:

  1. modifyWindowsUpdateConfiguration.ps1 ( provided in the above pdf)

  • settings.xml (Attached in above pdf)

  • Setupconfig.ini ( provided in the above pdf)



How To-Best Practice
Comment List