Windows startup script is a script that runs automatically when the operating system starts up. It is used to trigger the agent installation process automatically when a machine boots up. This ensures that the agent is installed before the user logs in, providing seamless deployment across multiple systems. Windows GPO Tool can be used to install agents using Startup Script.
If a new GPO policy is applied, the installation for existing installed agents will be skipped on all machines. The remaining agents will be installed according to the new policy.
For Endpoint Central versions 10.1.2124.1 and above, it is recommended to use exe based installation.
1.Download the agent package

3. Create a GPO to identify targets for deployment

Note: To install agents selectively on a few devices
4. Enter a Name for the new GPO. For example, "EC_Agent_Install". Once the new GPO is created, you can see it in the GPMC in the left navigation pane, under Group Policy Objects.
5. Create a start-up task to execute the deployment and installation of the Windows Agent.


Note: If the files can't be placed in the shared UNC folder path, open folder and with local path and paste the files.


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

6. Click OK to close the Add a Script dialog box
7. Click OK to close the Startup Properties dialog box
8. Close the Group Policy Object Editor
9. Close the Group Policy Management dialog box
10. The script will be executed when the client computers reboot
Ensure the network path is accessible from the endpoints and check if the required files for installation are present in the shared folder.
Reach out to support with the below files if issue persists.
1. GPO result from the client machine.
2. Event Logs
Export and upload application and system event viewer logs
Note: Ensure that the network has a Domain based setup and not Workgroup setup. You can map the script to the entire domain even if you have installed the agents in a few client computers as the script will install the agent only in the computers in which the agent is not installed.
Select the required office.
Note: This can be a local office or a remote office depending on which computers you want to install agents in.
Kindly include DCAgentServerInfo.json file only if the build version is 10.1.2124.1 and above.
How to obtain { ID } Value :-
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.
Note: As an alternative to the execution of VBscript, you can execute PowerShell script for agent installation using GPO.
For executing VBScript, follow these steps (refer this image):
Kindly include DCAgentServerInfo.json file only if the build version is 10.1.2124.1 and above.
Browse and navigate to the location, copy the browsed path (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and select InstallAgent.vbs script. Then specify the path (copied location) and the script as mentioned below:
Specify the script arguments as:
For executing PowerShell script, follow these steps and refer this image):
Kindly include DCAgentServerInfo.json file only if the build version is 10.1.2124.1 and above.
(\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup)\PSInstallAgent.ps1
Specify the script arguments as"UEMSAgent.msi UEMSAgent.mst DMRootCA.crt"
Specify the script arguments as"UEMSAgent.msi UEMSAgent.mst DMRootCA.crt DMRootCA-Server.crt"
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
You also do not need to update and download the UEMSAgent.msi file every time the server is updated to a new version. 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
These are the other ways by which you can proceed with agent installation.
Listed below are a few possible issues that can be encountered during agent installation, and resolution steps for the same.
If you still find issues with installing the agents, then feel free to contact our support team at endpointcentral-support@manageengine.com.