Azure Monitor Agent Silent Install (How-To Guide)

Azure Monitor Agent (AMA) collects monitoring data from the guest operating system of Azure and hybrid virtual machines. It then delivers this data to Azure Monitor for use by various features, insights, and other services, such as Microsoft Sentinel and Microsoft Defender for Cloud. AMA replaces Azure Monitor’s legacy monitoring agents (MMA/OMS). This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of the Azure Monitor Agent from the command line using the MSI installer.

How to Install the Azure Monitor Agent Silently

Azure Monitor Agent Silent Install (MSI)

  1. Navigate to: https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-windows-client#install-the-agent
  2. Download the AzureMonitorAgentClientSetup.msi to a folder created at (C:\Downloads)
  3. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  4. Navigate to the “C:\Downloads” folder
  5. Enter the following command: MsiExec.exe /i AzureMonitorAgentClientSetup.msi /qn
  6. Press Enter

After a few moments you will find Azure Monitor Agent entries in the Installation Directory and Programs and Features in the Control Panel.

Software Title:Azure Monitor Agent
Vendor:Microsoft Corporation
Architecture:x86_x64
Installer Type:MSI
Silent Install Switch:MsiExec.exe /i AzureMonitorAgentClientSetup.msi /qn
Silent Uninstall Switch:MsiExec.exe /x AzureMonitorAgentClientSetup.msi /qn
Repair Command:MsiExec.exe /fa AzureMonitorAgentClientSetup.msi /qn
Download Link:Azure Monitor Agent Download
PowerShell Script:Azure Monitor Agent | PowerShell Script
Detection Script:Azure Monitor Agent | Custom Detection Script

The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.


Additional Configurations

Create an Azure Monitor Agent Installation Log File

The Azure Monitor Agent MSI installer offers the option to generate a log file during installation to assist with troubleshooting should any problems arise. You can use the following command to create a verbose log file with details about the installation.

Azure Monitor Agent Silent Install (MSI) with Logging

MsiExec.exe /i AzureMonitorAgentClientSetup.msi /qn /L*v "%WINDIR%\Temp\AzureMonitorAgent-Install.log"

Change the Azure Monitor Agent Default Installation Directory

You can also change the default installation directory by using the following command line parameters. In this example, I’m installing Azure Monitor Agent to “C:\AzureMonitorAgent”

MsiExec.exe /i AzureMonitorAgentClientSetup.msi /qn INSTALLDIR="C:\AzureMonitorAgent"

Change the Azure Monitor Agent Default Data Store Directory

MsiExec.exe /i AzureMonitorAgentClientSetup.msi /qn DATASTOREDIR="C:\AzureMonitorAgent\DataStore"

Additional Azure Monitor Agent Parameters

ParameterDescription
INSTALLDIRDirectory path where the agent binaries are installed
DATASTOREDIRDirectory path where the agent stores its operational logs and data
PROXYUSEMust be set to “true” to use proxy
PROXYADDRESSSet to Proxy Address. PROXYUSE must be set to “true” to be correctly applied
PROXYUSEAUTHSet to “true” if proxy requires authentication
PROXYUSERNAMESet to Proxy username. PROXYUSE and PROXYUSEAUTH must be set to “true”
PROXYPASSWORDSet to Proxy password. PROXYUSE and PROXYUSEAUTH must be set to “true”
CLOUDENVSet to Cloud. “Azure Commercial”, “Azure China”, “Azure US Gov”, “Azure USNat”, or “Azure USSec

How to Uninstall Azure Monitor Agent Silently

Check out the following posts for a scripted solution:

Azure Monitor Agent Install and Uninstall (PowerShell)
Azure Monitor Agent Silent Uninstall (PowerShell)
  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter one of the following commands:
VersionAzure Monitor Agent Silent Uninstall String
1.27.0.0MsiExec.exe /x {D3E0BA3C-4A79-4BE0-8FC4-C167D3C2CE1D} /qn
1.26.0.0MsiExec.exe /x {0E61117D-EBF1-4920-BF23-36BE5EDD2C70} /qn

Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.

Jason Bergner

I am an accomplished Software Engineer at Patch My PC, leveraging more than 18 years of hands-on experience in Configuration Manager administration and application packaging. I am driven by a genuine passion for solving complex problems and consistently strive to discover innovative and effective solutions. Sharing my extensive knowledge of application deployments is a true joy for me, and I am honored to contribute to the community here at Silent Install HQ.

Recent Posts