This script was created to help our customer needs to Install ServiceMap and MMA Agents then Update this Agent with Azure OMS workspaceID And workspaceKey, optionally Configure Proxy
I had a customer requirement to push MMA and Dependency Agent automatically on 530 VMs with specific configuration as they already have SCOM in place, for that purpose I created two scripts one for just modifying the current MMA agent and configure to push their logs to SCOM as well as OMS gateway and the second one is just to replace the current MMA agent with the new MMA one and its configuration.  then added both to SCCM for normal deployment.
Here I’m sharing with you a kind of combined script which includes both functionalities with clear NOTES,  hence you have the right to just use the script as-is or remove region which not part of your target.
For more information on the script and to download it, please check TechNet Post; here.
Share:

administrator

Microsoft MVP | Speaker | Azure Service Delivery Lead at Bespin Global MEA, helping customers build successful Azure practices. Talks about #AzureCloud and #AI