Dec 29 2019
09:52 PM
- last edited on
Apr 08 2022
10:14 AM
by
TechCommunityAP
Dec 29 2019
09:52 PM
- last edited on
Apr 08 2022
10:14 AM
by
TechCommunityAP
I have the multiple VMs in my space. i want to insert the OMS agent into all the VMs.
How to perform this using powerShell? any script, i can put my VM name and resource group into a csv file and run the script and Agents has been updated in all VMs.
Dec 30 2019 04:49 AM
@Prashant Sharma, you have several options to onboard your VMs to Log Analytics. If the VMs are running in Azure, you can onboard them via Azure Portal, Azure Policy (the recommended way, as with the "Deploy Log Analytics agent" policies, every new VM will be automatically onboarded), via ARM templates, or via command line (Powershell/CLI).
Answering your specific question, the Powershell approach would be: