Cool Solutions

Using PowerShell Script to Manage the Windows 10 Update Policy



By:

May 4, 2018 8:58 am

Reads:466

Comments:0

Score:Unrated

Print/PDF

Introduction

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

Prerequisites

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 https://www.novell.com/documentation/zenworks-2017-update-1/zen_cm_software_distribution/data/ba480hx.html

  1. In the Bundles page, click the bundle that was created in the previous step and click Actions > Launch.
  2. 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.

  3. 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 https://www.novell.com/documentation/zenworks-2017-update-1/zen_cm_software_distribution/data/ba4pobn.html

  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 https://www.novell.com/documentation/zenworks-2017-update-1/zen_cm_software_distribution/data/bs8c8lh.html

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)
  2. settings.xml (Attached in above pdf)
  3. Setupconfig.ini ( provided in the above pdf)

 

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...

Tags: , , , ,
Categories: Endpoint Security, Security, Technical, ZENworks

0

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS