The first step involves downloading an agent from Endpoint Central. To download an agent, follow the steps given below:
After the agent is downloaded, navigate to Intune and follow the steps given below:
Prerequisites:
- An Azure subscription
- An Automation account to hold the runbook and authenticate to Azure resources
- A storage account to hold the agent binaries and script
Download The Agent Installation Files
- Open the Server web console.
- Navigate to the Agent tab
- Click Agent Installation on the left pane
- Click on Other Methods ---> Download Agent from the Command line option
- Select the required remote office
- Download and extract the agent installer files (UEMSAgent.msi , UEMSAgent.mst,DCAgentServerInfo.json , DMRootCA.crt and DMRootCA-Server.crt)
Note: DMRootCA-Server.crt will not be available when a 3rd party certificate is uploaded in the server and will not be available for a cloud edition too.
Storage Account Creation
- Login to the Azure portal
- select the Storage Account
- Click new and Create a new storage account
- Select the Target Subscription and Resource group
- Enter the name of the storage account. Storage account name: "ecagentbinary"

Note: Use the same name as mentioned above. If a different name is provided then it should be updated in the automation runbook script.
You can modify the default values as per your requirements
- Once done, click create and wait for the deployment to get completed
- After the deployment is successfully completed, Click on Go to resource option
- Select Overview and click Upload

- Add the following files: (UEMSAgent.msi , UEMSAgent.mst,DCAgentServerInfo.json , DMRootCA.crt and DMRootCA-Server.crt)
- Provide the container name as "scriptcontainer"
Note: Use the same name as mentioned above. If a different name is provided then it should be updated in the automation runbook script.
- Once the Upload is successfully completed, open the container tab in data storage and open the "scriptcontainer"

- Right click on UEMSAgent.msi file and select the Generate SAS option

- Set the expiration date for the link and allowed protocol. Once done click Generate SAS token and URL

- Copy the "Blob SAS URL"
- Download the attached script and open in a text editor:
- Replace the "UEMSAgent.msi_Agent_MSI_URL" with " Blob SAS URL "
- Repeat steps 11-14 for remaining files (UEMSAgent.mst,DCAgentServerInfo.json , DMRootCA.crt and DMRootCA-Server.crt)
- Save the file with name as InstallAgentAzure.ps1
- Upload the InstallAgentAzure.ps1 to the same "scriptcontainer"
- Finally the container should consist of the following files given below:

Azure Automation Account Creation
- Login to the Azure portal
- Select the Automation account
- Click New and Create a new Automation account
- Select the Target subscription and Resource group
- Enter the name of the Automation account. Automation account name: "agentinstallation"
- Select System Managed Identity
- Once completed, review and create the account

- After the deployment is successfully completed, click go to resource
- Search for identity and click "System Managed Identity"

- Toggle the status to ON
- Click "Azure role assignments" and assign the following two roles with "add role assignment" option.
- Choose Scope: Resource group
- Select Subscription: Target subscription
- Choose Role: Virtual Machine Contributor
Your first role is successfully added
Enter the following details to add the second role
- Choose Scope: Storage
- Choose Subscription: Target subscription
- Select Resource: ecagentbinary
- Choose Role: Storage Blob Data Contributor
- Wait for few minutes to check whether the roles are assigned

- Once the status has been updated, go to the automation account and select the runbook option and create new runbook.
- Click overview->edit and open the editor
- Download the script below and copy the link paste it into the editor
Download script
- Save and publish the runbook
- Wait for the deployment and click start once it is available
- Open the Jobs tab once started and monitor the status of deployment from the output Tab.
- Execution status of agent installation scripts in VMs.
- Incase of any error in script execution, Make sure the below two module were imported in the module tab of the automation account.
Run time version 5.1
- az.accounts

- az. compute

For Silent Installation
Steps:
For versions below 10.1.2124.1, steps are as follows:
The following steps will help you create a single the agent installer for silent installation :-
- Download the ZIP file
- Extract the selfextractor.zip files to a folder.
- Download the agent installer files from Endpoint Central-->Admin-->Scope of Management-->Get the UEMSAgent.msi and UEMSAgent.mst files.
- Copy paste the UEMSAgent.msi and UEMSAgent.mst file into the Selfextractor folder that you extracted.
- Run "Execreation.bat" from the extracted location and it will generate a file "DCAgentInstaller.exe"
- Now you can use the "DCAgentInstaller.exe"
This DCAgentinstaller.exe can be used in SCCM, Intune or in any other deployment tools. This will help you install the agent silently.
For versions 10.1.2124.1 and above, steps are as follows:
- From the product server web console, navigate to Agent --> Computers --> Download Agent.
- Silent Install Command : "<filename>.exe" /Silent, for example, "LocalOffice_Agent.exe" /Silent
This downloaded EXE can be used in SCCM, Intune or in any other deployment tools with the command mentioned above. This will help you install the agent silently.