How to Install OMS Agent for a Linux 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 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 performance logs or the application logs of a Linux family Azure Virtual Machine by connecting it to Azure Log Analytics Workspace. Steps to Configure OMS Agent on a Linux VMStep 1: Log in to Azure Portal. Step 2: Access the Azure Cloud Shell and Switch to PowerShell Terminal. Step 3: Now Create a new file named installOMSAgent.ps1 using the touch command. touch installOMSAgent.ps1Step 4: Use the below-following command to write the code in a file. code installOMSAgent.ps1 Step 5: Paste the below-following code in the install OMSAgent.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 ` -ResourceGroupName "<add VM resource group>" ` -VMName "<add server name>" ` -ExtensionName "OmsAgentForLinux" ` -ExtensionType "OmsAgentForLinux" ` -Publisher Microsoft.EnterpriseCloud.Monitoring ` -TypeHandlerVersion latestVersion ` -SettingString $PublicSettings ` -ProtectedSettingString $ProtectedSettings ` -Location "<location name>" ` -EnableAutomaticUpgrade $true Step 6: Save the file and run the code. Use the following command to run the code. ./installOMSAgent.ps1 Step 7: Go to your target Azure VM and check the Extensions + applications. You should see this "OmsAgentForLinux" extension on Azure VM if successful. This is how you can install an Operations Management Suite (OMS) extension for a Linux Virtual Machine in Microsoft Azure. Comment More infoAdvertise with us Next Article How to Install OMS Agent for a Linux Virtual Machine using PowerShell? jaysurya9 Follow Improve Article Tags : Microsoft Azure DevOps azure-virtual-machine Similar Reads How to Install MMA Agent for a Windows Virtual Machine using PowerShell? 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 2 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 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 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 Install rpm Package in Linux Using Ansible ? Ansible, a strong computing automation tool, expands its capabilities beyond configuration management to package management, including the installation of RPM packages on Linux frameworks.RPM (Red Hat Package Manager) is a package management system executives framework utilized by different Linux di 7 min read How to Install SQL Server Agent on MacOS? SQL Server is a Relational Database Management system(RDBMS) developed by Microsoft. SQL Server consists of two major components namely Database Engine and SQLOS. Along with the creation and execution of triggers Database Engine also processes queries and manages Database fields. SQLOS provides serv 2 min read Microsoft Azure - Using PowerShell Core on Linux PowerShell Core on Linux is now integrated into Azure Cloud Shell. PowerShell used to be only available on Windows. Now, with PowerShell Core, it is cross-platform and runs on macOS and lots of Linux distributions like Ubuntu and Red Hat on ARM-Based platforms and even on Windows. This allows you to 3 min read Microsoft Azure - Improvements in Linux Virtual Machine Azure provides an easy method of creating and accessing Linux Virtual Machines (VMs) with SSH Keys. It makes things simpler for you so that you can concentrate on your work instead of complicated setup. In this article, you will learn the steps you need to create a Linux VM, generate SSH keys automa 3 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 Microsoft Azure - Find Virtual Machine Extensions using Resource Graph Query Azure is Microsoftâs cloud platform, just like Google has its Google Cloud and Amazon has its Amazon Web Service or AWS.000. Generally, it is a platform through which we can use Microsoftâs resources. Here in this article, we are going to learn about how we find azure virtual machine-installed agent 2 min read Like