19 Apr 202206:58 AM - last edited on 19 Apr 202207:17 AM by Karolina_Linda
I recently did a OneAgent deployment to a large volume of Virtual Machines in Azure via PowerShell and noticed that the Dynatrace Documentation doesnt cover how to install the Dynatrace OneAgent VM Extension in Infrastructure Only Mode. (The Documentation uses the depreciated AzureRM Module and doesnt cover the syntax for the settings to enable Infrastructure Only mode on installation). Thought i would drop this here in case anyone runs into the same issue, hopefully it makes someone's life a little easier.
This script can be modified to suit any specific situation, in this example you can simply export the VM's from the Virtual Machine blade in Azure into a csv (in this case i targeted windows VM's) and change the column header "Resource Group" to "ResourceGroup". Good for large deployments where you only want to target a single subscription at a time for a rollout. Simply fill in the < >
Remember to Import the .Az module and use Get-AzSubscription to find the correct subscription ID and then Set-AzContext -Subscription <Subscription ID Here> to set the context to the desired subscription