Install agents using Start Up Script

You are trying to install an agent. However, it fails. You are unable to install the agent even after following the resolutions provided. You see either of the following errors on the screen:

Each of the errors mentioned above can be solved using the resolutions provided in the respective knowledge base articles. However, if you cannot solve them you can use a script to install the agent manually.

Cause

The agents are installed remotely using the credentials of the administrator for a domain or that of a common administrator. These credentials are specified while adding a domain or workgroup. The installation may fail if a remote connection cannot be established.

Resolution

Steps for agent installation using startup script vary with respect to the version of the product you are currently using. Choose the options below to view the steps based on the Central Server version you have:

Run the script in multiple computers using the startup script of Active Directory

You can install an agent in your client computers using the startup script of the Active Directory. This is done by running a script in multiple computers adding the startup script of the Active Directory in your client computers.

To install agents in client computers using a GPO, follow the steps given below:

Note: Ensure that you complete the steps given below in a Domain Controller setting. You can map the script to a domain even if you have installed the agents in a few client computers. The script will install the agent only in the computers in which the agent is not installed.

  • Download the zip file by following the steps given below:
    1. Click on Agent
    2. Click on Agent Installation from Deployment
    3. Click on Download Agent under GPO

    Note: This can be a local office or a remote office depending on which computers you want to install agents in.

  • Save the .msi & .mst file in the network share that you have created.
  • Include DCAgentServerInfo.json file only if the build version is 10.1.2124.1 and above.

  • Click Start>Run
  • Enter gpmc.msc
  • Click OK
  • Right-click the domain and select Create and Link a GPO here
  • Specify a name for the GPO
  • Select the GPO
  • If you want to install the agent in only a few client computers, follow the steps given below. To install the agent in all your client computers skip these steps.

    1. Click the Scope tab
    2. In the Security Filtering section, click Add
    3. In the Select User, Computer, or Group dialog box, click Object Types
    4. Select specific computer object types
    5. Click OK
    6. Specify the computer names
    7. Click Check Names
    8. Click OK
  • Right-click the GPO and click Edit
  • Expand Computer Configuration>Policies>Windows Settings>Scripts
  • Right-click Startup and click Properties
  • Click Show Files
  • Drag and drop the InstallAgent.vbs (download the .txt file and rename it as .vbs) & UEMSAgent.msi UEMSAgent.mst to this location (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup), copy the location and close.
  • In the Startup Properties dialog box, click Add
  • Browse and navigate to the location (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and select the InstallAgent.vbs script
    or
    specify the path (copied location)and the script as mentioned below:
    (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup)\InstallAgent.vbs
  • Specify the script parameters as mentioned below:
    UEMSAgent.msi UEMSAgent.mst
  • For Build 100653 and above:

  • If SSL third party certificate is uploaded in the server, go to Admin -> Security Settings -> Import SSL Certificates, the below files should be added along with Agent installer files:
    DMRootCA.crt
  • Specify the script arguments as "UEMS.msi UEMS.mst \\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup\DMRootCA.crt"

  • If SSL third party certificate is not uploaded in the server, Admin -> Security Settings -> Import SSL Certificates, the below files should be added along with Agent installer files:
    DMRootCA.crt and DMRootCA-Server.crt
  • Specify the script arguments as "UEMS.msi UEMS.mst \\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup\DMRootCA.crt and \\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup\DMRootCA-Server.crt"

  • Click OK to close the Add a Script dialog box
  • Click OK to close the Startup Properties dialog box
  • Close the Group Policy Object Editor
  • Close the Group Policy Management dialog box

    Note: The script can be deployed to all the computers in the domain. It is to be noted that the target shouldn't be a user group.

The script will be executed when the client computers reboot next. After the execution of the script, the agent is automatically installed in all the client computers.

Note: As an alternative to the execution of VBscript, you can execute PowerShell script for agent installation using GPO.

For executing a PowerShell script, follow the steps mentioned below:

  • Ensure if PowerShell is enabled in all the client computers before execution of this script.
  • Expand Computer Configuration --> Policies --> Windows Settings --> PowerShell scripts
  • Right click Startup and click Properties
  • Click Show Files
  • Drag and drop the InstallAgent.ps1 (download the .txt file and rename it as .ps1) & UEMSAgent.msi UEMSAgent.mst to the location: (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup), copy the location and close.

Kindly include DCAgentServerInfo.json file only if the build version is 10.1.2124.1 and above.

  • In the Startup Properties dialog box, click Add
  • Browse and navigate to the location, copy the browsed path (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and select the PSInstallAgent.ps1 script.
  • Then specify the path (copied location) and the script as:(\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup)\PSInstallAgent.ps1
  • Specify the script parameters as: "UEMSAgent.msi" "UEMSAgent.mst"
  • For Build 100653 and above:

  • If SSL third party certificate is uploaded in the server, navigate to Admin -> Security Settings -> Import SSL Certificates
  • Added DMRootCA.crt along with Agent installer files
  • Specify the script arguments as: "UEMSAgent.msi UEMSAgent.mst DMRootCA.crt"
  • If SSL third party certificate is not uploaded in the server, navigate to Admin -> Security Settings -> Import SSL Certificates
  • DMRootCA.crt and DMRootCA-Server.crt should be added along with Agent installer files
  • Specify the script arguments as: "UEMSAgent.msi UEMSAgent.mst DMRootCA.crt DMRootCA-Server.crt"
  • Click OK to close the Add a Script dialog box
  • Click OK to close the Startup Properties dialog box
  • Close the Group Policy Object Editor
  • Close the Group Policy Management dialog box

Note: The script can be deployed to all the computers in the domain. It is to be noted that the target shouldn't be a user group.

Notes:
  • Set the file association properties of .vbs files to Microsoft Windows (r) based script host in all the client computers. This ensures that the script is executed successfully. Do not modify the file association properties to open in a text editor as the execution of the script will fail.
  • You can leave the group policy object settings installed unchanged, to ensure that the agent is installed in the client computers that join the domain in the future.
  • This will not re-install the agent that is already installed as the script is programmed to ensure that it doesn't re-install agents that are already installed. This will not cause any problems during startup.
  • You also do not need to update and download the UEMSAgent.msi file every time a new version is released. The agent is programmed to check for new versions from the server and upgrade itself automatically. When an agent is installed, it updates itself automatically when new versions are released.

    You have now installed an agent in client computers using a GPO.

    Configuring IP Scope will help you while you deploy agents using GPO

    • If IP scope is configured for all the remote offices created in central server, administrators can directly download local office UEMS_Agent.msi and deploy it in all remote offices using GPO.
    • IP scope has an automatic intelligence to detect computers within the specified IP range and reinstall the appropriate agent for the remote office.
    • To know about how to configure IP scope, click here