Installing OpManager MSP agent on devices using Startup script
Windows GPO can be used to install the OpManager MSP 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 MSP agent installed only in a few devices, as the agent will be installed only in devices that don't have the agent installed already.
- In the OpManager MSP web console, go to Settings → Discovery → Deploy Agent.
- Click on the "Download" button to get the OpManager MSP Agent zip file. Extract the zip file and paste the extracted OpManagerAgent.msi and OPMAgentServerInfo.json files in the local directory.
- 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).
- In the AD server, click on Start → Run
- Enter gpmc.msc and click Okay.
- Right-click on the domain, and select Create and link a GPO here.
- Specify a name for the GPO.
- 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.
- Right-click the GPO and click on "Edit".
- For executing VBScript, follow these steps (refer this image):
- 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):
- 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.