4.7 KiB
title, titleSuffix, description, ms.service, ms.subservice, ms.topic, author, ms.author, manager, ms.localizationpriority, appliesto, ms.date
title | titleSuffix | description | ms.service | ms.subservice | ms.topic | author | ms.author | manager | ms.localizationpriority | appliesto | ms.date | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Configure clients with a script | Windows Update for Business reports | How to get and use the Windows Update for Business reports configuration script to configure devices for Windows Update for Business reports. | windows-client | itpro-updates | conceptual | mestew | mstewart | aaroncz | medium |
|
07/09/2024 |
Configuring devices through the Windows Update for Business reports configuration script
The Windows Update for Business reports configuration script is the recommended method of configuring devices to send data to Microsoft for use with Windows Update for Business reports. The script configures the registry keys backing policies, ensures required services are running, and more. This script is a recommended complement to configuring the required policies documented in Manually configure devices for Windows Update for Business reports, as it can provide feedback on whether there are any configuration issues outside of policies being configured.
About the script
The configuration script configures registry keys directly. Registry keys can potentially be overwritten by policy settings like Group Policy or MDM. Reconfiguring devices with the script doesn't reconfigure previously set policies, both in the case of Group Policy and MDM. If there are conflicts between your Group Policy or MDM configurations and the required configurations listed in Manually configuring devices for Windows Update for Business reports, device data might not appear in Windows Update for Business reports correctly.
You can download the script from the Microsoft Download Center.
How this script is organized
This script's two primary files are ConfigScript.ps1
and RunConfig.bat
. You configure RunConfig.bat
according to the directions in the .bat
itself, which will then run ConfigScript.ps1
with the parameters entered to RunConfig.bat
. There are two ways of using the script: in Pilot mode or Deployment mode.
Important
PsExec is used to run the script in the system context. Once the device is configured, remove PsExec.exe from the device.
How to use this script
Edit the RunConfig.bat
file to configure the following variables, then run the edited .bat file:
Variable | Allowed values and description | Example |
---|---|---|
runMode | Pilot (default): Verbose mode with additional diagnostics and logging. Pilot mode is best for a testing run of the script or for troubleshooting. Deployment: Doesn't run any additional diagnostics or add extra logging |
runMode=Pilot |
logPath | Path where the logs are saved. The default location of the logs is .\UCLogs . |
logPath=C:\temp\logs |
logMode | 0: Log to the console only 1 (default): Log to file and console. 2: Log to file only. |
logMode=2 |
DeviceNameOptIn | true (default): Device name is sent to Microsoft. false: Device name isn't sent to Microsoft. |
DeviceNameOptIn=true |
ClientProxy | Direct (default): No proxy is used. The connection to the endpoints is direct. System: The system proxy, without authentication, is used. This type of proxy is typically configured with netsh and can be verified using netsh winhttp show proxy . User: The proxy is configured through IE and it might or might not require user authentication. For more information, see How the Windows Update client determines which proxy server to use to connect to the Windows Update website |
ClientProxy=Direct |
source | Used by the .bat file and PowerShell script to locate dependencies. It's recommended that you don't change this value. | source=%~dp0 |
Script errors
[!INCLUDE Windows Update for Business reports script error codes]