Installing OpManager agent on devices using Startup script

Windows GPO can be used to install the OpManager agent in multiple devices, even when other methods of installation fail. Various reasons behind agent installation failure are as follows:

Note: Ensure that the network has a domain-based setup and not a workgroup-based setup. You can even map the script to include the entire domain even if you have the OpManager agent installed only in a few devices, as the agent will be installed only in devices that don't have the agent installed already.

    1. In the OpManager web console, go to Settings → Discovery → Deploy Agent.
    2. Click on the "Download" button to get the OpManager Agent zip file. Extract the zip file and paste the extracted OpManagerAgent.msi and OPMAgentServerInfo.json files in the local directory.
    3. Identify the parent domain server(s) for the client computers, and copy the extracted OpManagerAgent.msi and OPMAgentServerInfo.json files to that domain server(s).
    4. In the AD server, click on Start → Run
    5. Enter gpmc.msc and click Okay.
    6. Right-click on the domain, and select Create and link a GPO here.

Create and link a new GPO window

    1. Specify a name for the GPO.
    2. Select the GPO.
Note: These steps need to be followed if you wish to install agents in a select few devices (refer this image). Do not follow these steps if you want to install agents in all the devices.
  • Click on the Scope tab.
  • Under Security Filtering section, click Add.
  • In the Select User, Computer, or Group dialog box, click Object Types.
  • Select specific computer object types, and click "Okay".
  • Specify the computer names, and click "Okay".
  • Finally, click on Check Names and then click "Okay" again.
    1. Right-click the GPO and click on "Edit".
    2. For executing VBScript, follow these steps (refer this image):
      • Expand Computer Configuration → Policies → Windows Settings → Scripts
      • Right-click Startup, and click Properties.
      • Click Show Files.
      • Drag and drop the InstallOPMAgent.vbs (download the .txt file and rename it as .vbs) and the extracted OpManagerAgent.msi and OPMServerInfo.json files to this location. Copy the path of this location (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and close the window.
      • In the Startup Properties dialog box, click Add.
      • Browse and navigate to the location, and copy the browsed path (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup).
      • Select InstallOPMAgent.vbs script.Then specify the path (copied location) and the script as mentioned below:

        (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup)\InstallOPMAgent.vbs

      • Specify the script parameter as mentioned below:
        OpManagerAgent.msi
    3. As an alternative to VBscript, you can also execute PowerShell script for agent installation using GPO. For executing PowerShell scripts, follow these steps and refer this image):
      • 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 psinstallopmagent.ps1 (download the .txt file and rename it as .ps1) and the extracted OpManagerAgent.msi and OPMAgentServerInfo.json files to this location. Copy the path of this location (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and close the window.
      • In the Startup Properties dialog box, click Add.
      • Browse and navigate to the location, and copy the browsed path (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup).
      • Select the psinstallopmagent.ps1 script.Then specify the path (copied location) and the script as mentioned below:

        (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup)\psinstallopmagent.ps1

      • Specify the script parameters as mentioned below:
        OpManagerAgent.msi
    4. Click "Okay" to close the Add a Script dialog box and the Startup Properties dialog box, and close both the Group Policy Object Editor and the Group Policy Management dialog boxes too.
Note: This script can be used to deploy the agent in all computers in the domain. Note that the target should not be a user group.

This script will be executed on the next reboot of the client computers after the deployment. Once this script is executed successfully, the OpManager agent will be installed in all the client computers. You can check these newly added devices under the Inventory page in OpManager.

Note:

  • The file association properties of .vbs files must be set to 'Microsoft Windows (r) based script host' in all the client computers, to ensure the script gets executed properly. If the file association properties have been modified to open the script file with a text editor, execution will fail.
  • The OpManager GPO object can be left as such to install the agent in future client computers automatically.
  • You need not worry about the agent getting re-installed, as the script has been written in a way to prevent unnecessary re-installation of the agent.
  • You also need not worry about updating the agent periodically. Updates for the OpManager agent get released along with the OpManager installation files, and OpManager will automatically push the agent update to the client computers whenever it is available.

If you had any other issues with agent installation, please contact our support team to get it resolved.

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.