Forum Discussion
How to connect multiple VMs of multiple regions to an OMS workspace.
- Jun 29, 2019
TravisRoberts thank you for this Travis. but I can not connect the single-single VM to the workspace.
I need a script (PowerShell script). so i can fill the VM name and resource group into the excel sheet and run that Excel sheet through the PowerShell script.
TravisRoberts thank you for this Travis. but I can not connect the single-single VM to the workspace.
I need a script (PowerShell script). so i can fill the VM name and resource group into the excel sheet and run that Excel sheet through the PowerShell script.
Prashant Sharma Below is a link to the command line setup. Possibly use this with Invoke-Command? Another Azure option would be to used a custom script extension to push the settings. DSC would also be an option. Best bet would be to push it out with SCCM or some other application deployment solution.
FWIW, OMS settings can be deployed as part of an ARM template.
- matrixmanOct 13, 2021Copper Contributor
TravisRoberts Can you have a machine connect to multiple workspace? I dont think this is possible.
Also, we have a customer with some machines connected to the wrong log analytics workspace so I will change it but I will need to re-install the agent right? I noticed the agent has no option to update the workspace ID (unfortunately)
Any help appreciated.
P.S. I follow you on Udemy. Keep up the good work 🙂
- Oct 13, 2021
matrixman The host pool maps to one workspace. You can't connect to multiple.
For Azure VM's it's best to remove the agent and re-add it for the correct log analytics workspace. I suspect there is a way to do that programmatically with PowerShell if here are a lot of them.
Thanks