How to Install MMA Agent for a Windows Virtual Machine using PowerShell? Last Updated : 30 Mar, 2023 Comments Improve Suggest changes Like Article Like Report Pre-requisite:- Azure Here in this article, we will show how to add or install MMA Agent on a Windows Virtual Machine in Azure using PowerShell. Before diving into the process let's know what an MMA agent is. MMA Stands for Microsoft Monitoring Agent can be configured to collect the performance logs or the application logs of an Azure Virtual Machine by connecting it to Log Analytics Workspace in Azure. Steps to configure MMA Agent on Windows VMStep 1: Log in to Azure Portal. Step 2: Access the Azure Cloud Shell and Switch to the PowerShell console Step 3: Now Use the below command to create a new file named installMMAAgent.ps1 touch installMMAAgent.ps1Step 4: use the command to write the code in the newly created file:installMMAAgent.ps1 code installMMAAgent.ps1 Step 5: Paste the below-following code in the install MMAAgent.ps1 file $subName = "<default subscription name>" Select-AzSubscription -Subscription $subName $workspaceRG = "<resource group name>" $workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName $workspaceRG $workspaceId = $workspace.CustomerId $workspaceKey = Get-AzOperationalInsightsWorkspaceSharedKeys -ResourceGroupName $workspaceRG -Name $Workspace.Name $Publicsettings=@{"workspaceId" = $workspaceId} $Protectedsettings=@{"workspaceKey" = $workspaceKey.primarysharedkey} Set-AzVMExtension -ExtensionName "Microsoft.EnterpriseCloud.Monitoring" ` -ResourceGroupName "<add VM resource group> ` -VMName "<add server name>" ` -Publisher "Microsoft.EnterpriseCloud.Monitoring" ` -ExtensionType "MicrosoftMonitoringAgent" ` -TypeHandlerVersion 1.0 ` -Settings $PublicSettings ` -ProtectedSettings $ProtectedSettings ` -Location "<location name>" Step 6: Save the file and run the code. Use the following command to run the code. ./installMMAAgent.ps1 Step 7: Go to your target Azure VM and check the Extensions + applications. You should see this "MicrosoftMonitoringAgent" extension on Azure VM if successful. This is how you can install a Microsoft Monitoring Agent (MMA) extension for a Windows Virtual Machine in Microsoft Azure. Comment More infoAdvertise with us Next Article How to Install MMA Agent for a Windows Virtual Machine using PowerShell? jaysurya9 Follow Improve Article Tags : Microsoft Azure DevOps azure-virtual-machine Similar Reads How to Install OMS Agent for a Linux Virtual Machine using PowerShell? Pre-requisite:- Azure Here in this article, we will show how to add or install OMS Agent on a Linux Virtual Machine in Azure using PowerShell. Before diving into the process let's know about what an OMS agent is. OMS Stands for Operations Management Suite Agent can be configured to collect the perfo 2 min read How to Create Virtual Network in Azure using PowerShell ? Microsoft Azure provides various resources and services to provide us with a scalable environment for development and testing processes. Azure provides a virtual machine service, which allows us to leverage the resources virtually. We may have more than one virtual machine as a resource, according t 9 min read How to Find AMA Agent Installed on Azure Virtual Machines using KQL Query? Azure Monitor Agent, simply known as AMA. It is a software agent that collects monitoring data from Windows and Linux machines, in Azure and non-Azure environments, including on-premises and third-party clouds. There are two types of AMA agents:Azure Monitor Agent for Windows installed for Azure Win 5 min read How to Install Docker using Chocolatey on Windows? Installing Docker in Windows with just the CLI is quite easier than you would expect. It just requires a few commands. This article assumes you have chocolatey installed on your respective windows machine. If not, you can install chocolatey from here. Chocolatey is a package manager for the Windows 4 min read How to Install Apache Maven on Windows? Apache Maven is an automation tool. The tool is written in Java. It was initially released on 13 July 2004. It is developed by the Apache software foundation. It is part of the Jakarta Project. It is working on two aspects: how software is built, and its dependencies. It was created by Jason van Zyl 3 min read Microsoft Azure - Resizing Virtual Machine Using PowerShell Script In this article, we will look into the process of resizing azure VMs at once using the Azure PowerShell automation script in the Azure portal by using the cloud shell. Advantages of using the method approach: Resizing Multiple VMs at once in a follow for select subscriptionSaves the time of the User 2 min read How to Create Windows VM in Azure Using Terraform In this article, we will cover the whole process of creating Windows VM in Azure using Terraform. When you have to create multiple VMs, perhaps even identical ones, or machines with nearly identical configurations, it can be repetitive and time-consuming to go through the manual setup process each t 10 min read How to Create Management Groups in Azure Through GUI and PowerShell? Pre-requisites: AZURE Azure's management groups are a hierarchical organizational structure that makes it possible to centralize the management of numerous Azure subscriptions. With management groups, you can apply policies and enforce compliance across your subscriptions and resources, making it ea 3 min read Provisioning Virtual Machines with Ansible: A How-To Guide Nowadays, with the rapidly changing world of IT infrastructure, the ability to provision and manage virtual machines (VMs) automatically is indispensable. Virtual machines offer great flexibility and scalability for deploying various applications, services, or development environments. Provisioning 8 min read Microsoft Azure - Manage Azure VMs using Azure PowerShell Commands Here we are using Azure PS Commands to manage azure resources from Azure Cloud Shell or by using Windows PowerShell. By using the simple AZ PS command we can manage Azure VM Quicks without any efforts of navigating in Azure Portal and at Scale. Let's get started by using the major Azure PS commands 2 min read Like