Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

AGENT INSTALL GPO START-UP SCRIPT

1. DC/EC/PMP Agent to PMP AGENT REINSTALLATION FOR ON-


PREMISE EDITION / CLOUD EDITION:
● Download and extract the agent installer files (.msi and .mst)
● Open the latest PMP web console.
● Navigate to the Agent tab
● Click Agent Installation on the left pane
● Now click on Other Methods click on Download Agent from the
Command Line option.
● Select the required remote office
● Download and extract the agent installer files (.msi, .mst and .json)

2. Download psinstallagent.ps1
https://downloads.zohocorp.com/dnd/Endpoint_Central/iFcx5XASUDlQef0/
psinstallagent.ps1
and place it in a folder.

3. Create a GPO to identify targets for deployment


● Open the Group Policy Management Console (GPMC) by opening Run
(Windows key + r) and typing gpmc.msc .

Once in the GPMC, right-click on your target "organizational unit" (typically a


domain), and select Create a GPO in this domain, and Link it here option.
AGENT INSTALL GPO START-UP SCRIPT

4. Enter a Name for the new GPO. For example, "MEDC_agent_reinstall".

5. Once the new GPO is created, you can see it in the GPMC in the left navigation
pane, under Group Policy Objects.

6. Create a start-up task to execute the deployment and installation of the Windows
Agent
● Open the Group Policy Management Editor by right-clicking on the new
GPO you created, and selecting Edit.
● Expand Computer Configuration --> Policies --> Windows Settings -->
scripts(Startup/Shutdown)
● Right click Startup and click Properties and switch to PowerShell Scripts.
AGENT INSTALL GPO START-UP SCRIPT

● Click Show Files


● Paste the psinstallagent.ps1 downloaded above into the created folder.
● Paste the below two files from agent installer zip downloaded above

UEMSAgent.msi
UEMSAgent.mst
● Paste the Below files which are available only after the DC build 100653
DMRootCA.crt
● Below file wont be available when 3rd party certificate uploaded in server
and wont be available for cloud edition. Can leave this file for migration
DMRootCA-Server.crt
● Below file is available only after the DC build 10.1.2127 and available for
cloud edition
DCAgentServerInfo.json

● Now copy the network Path, we need it in the later steps. Copy the location
(\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\
Startup)
AGENT INSTALL GPO START-UP SCRIPT

● In the Startup Properties dialog box, click Add.

● Browse and navigate to the location, copy the full path (\\Domain name\
SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) of
PSInstallAgent.ps1script. Then specify the path (copied location) and the
script as mentioned below:
AGENT INSTALL GPO START-UP SCRIPT

EXAMPLE:
Script Name:

\\domain.com\SysVol\domain.com\Policies\{id}\Machine\Scripts\Startup\
psinstallagent.ps1

**( replace \\domain.com\SysVol\domain.com\Policies\{id}\Machine\Scripts\Startup with the


network path you copied earlier.
\\<domain.com>\SYSVOL\<domain.com>\Policies\{id}\Machine\Scripts\Startup
psinstallagent.ps1 )

Script Parameters:
UEMSAgent.msi UEMSAgent.mst

*(if DesktopCentralAgent.msi and DesktopCentralAgent.mst uploaded instead


of UEMSAgent.msi and UEMSAgent.mst, then use the below Argument)
AGENT INSTALL GPO START-UP SCRIPT

UEMSAgent.msi UEMSAgent.mst

7. Click OK to close the Add a Script dialog box

8. Click OK to close the Startup Properties dialog box

9. Close the Group Policy Object Editor

10. Close the Group Policy Management dialog box

11. The script will be executed when the client computers reboot

Note:
● Please test it few test machines before mass deployment.
● Execute the below command on the client machine with admin privileges to
trigger the GPO task and reboot the machine to take effect.

cmd: gpupdate /force

● The After the successful execution of the script, a log file


MEDC_GPO_Agent_Migration.log will be created in the C:\ directory of
the client computer. If the log file is not present in C:\ , then the script
execution failed. Please ensure the network path and check whether the
required files are present.

Please share the below files if issue persists.


○ MEDC_GPO_Agent_Migration.log (if present)

○ GPO result from the client machine.


- In client machine, open cmd with Administrator mode.
- In cmd, navigate to C:\ and run the command gpresult /h
gprep.html
- Kindly upload gprep.html file under C:\ from the client machine.
AGENT INSTALL GPO START-UP SCRIPT

○ Export and upload Event viewer logs


- Application log
- System log.

You might also like