Skip to main content

_QG_XUM_

Deploy update agents on multiple hosts using a script

Last Updated: 2 minute read

To save time when installing the XProtect Update Manager Agent component on multiple hosts, you can use a PowerShell script that deploys the component automatically on the hosts you specify.

Note

To use the script, you must have installed the XProtect Update Manager Service component on a host in your network.

Prerequisites

Before you start the installation, prepare the following files:

  • A .csv or .txt file with host names. Create a new file that lists the hostnames of the computers on which you want to install an update agent.

  • (For system-generated certificates) The secure connection key for the update server. The key is created when you install the update server with a system-generated certificate. See Encryption between the XProtect Update Manager components.

  • Deployment script file. The file contains the necessary commands to install the update agents in a distributed system. You can download the file from here.

Deployment

To begin the installation, run Windows Command Prompt as administrator and go to the location of the deployment script.

Deployment with a secure connection key

.\AgentsDeploy.ps1 -agentsFileList [HOSTNAMES] -serverAddress [UPDATE SERVER] -installFile [INSTALL FILE] -CertificateMode SelfSigned -SecureKey [KEY]

Where [HOSTNAMES] is the full path of the hosts file, [UPDATE SERVER] is the hostname of the update server, [INSTALL FILE] is the full path to the XProtect Update Manager executable file, and [KEY] is the secure connection key.

Example:

.\AgentsDeploy.ps1 -agentsFileList C:\Users\Admin\Downloads\hosts.csv -serverAddress SERVER1 -installFile C:\Users\admin\Downloads\XProtectUpdateManagerInstaller.exe -CertificateMode SelfSigned -SecureKey 370BB40F170E893110ADB24FB76330F76D21AFABCC4AB3D1150C9A28F9AA5E931F98244B517A419C75AD12CAB89FD47F06C8F5D2523E1F908E68C1F288E76EC7

Deployment with your own certificate

.\AgentsDeploy.ps1 -agentsFileList [HOSTNAMES] -serverAddress [UPDATE SERVER] -installFile [INSTALL FILE] -CertificateMode CertificateAuthority

Where [HOSTNAMES] is the full path of the hosts file, [UPDATE SERVER] is the hostname of the update server and [INSTALL FILE] is the full path to the XProtect Update Manager executable file.

Example:

.\AgentsDeploy.ps1 -agentsFileList C:\Users\Admin\Downloads\hosts.csv -serverAddress SERVER1 -installFile C:\Users\admin\Downloads\XProtectUpdateManagerInstaller.exe -CertificateMode CertificateAuthority

The script installs the update agents on the hosts and connects the hosts to the selected update server.