MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.21k stars 21.37k forks source link

How to script adding a second workspace to OMS/ALA #36246

Closed vboyev-MSFT closed 5 years ago

vboyev-MSFT commented 5 years ago

Scenario: MMA is deployed. Servers are connected to SCOM as well as to ALA workspace. Need to script an additional workspace.

This scenario is not documented. How do you add an additional workspace key and ID while preserving the existing configuration programmatically?

Also, how do you programmatically remove a single workspace if multiple are defined?

This becoming a common scenario with customers enrolling in services such as MDATP and ALA/ASC etc....

Azure documentation issue guidance

Thanks for opening an issue in the Azure technical documentation repository.

We use GitHub issues as the primary channel for customer and community feedback about the Azure documentation.

Creating an issue

We prefer that you create documentation feedback issues using the Feedback link on the published article - the feedback control on the doc page creates an issue that contains all the article details so you can focus on the feedback part.

You can also create a feedback issue here in the repo. If you do this, please make sure your issue lists:

Pull requests and article contributions

If you know the change that is needed in an article, we encourage you to submit the changes directly using a pull request. If the change is large, or if you want to contribute an entire article, follow these guidelines:

We'll route the issue to the appropriate content team for review and discussion.

Tech support and product feedback

If you would like to contact Microsoft about other things, such as product feedback or tech support, please review these guidelines:

KrishnaG-MSFT commented 5 years ago

@vboyev-MSFT Thanks for reaching out to us, but at this time it does not look like you are referring to a document but to a specific scenario. If that's the case we request you to please post your question on MSDN and other forums, we have our engineers and others who are monitoring them and will be happy to help. If you have a document which you are following and if you think it needs an update, please let us know about that here.

KrishnaG-MSFT commented 5 years ago

@vboyev-MSFT According to this blog regarding Log Analytics agent multi-homing support, you may use ComObject 'AgentConfigManager.MgmtSvcCfg' and it's member 'AddCloudWorkspace' to add a workspace. I didn't test but just did a quick check if we have some member to remove a workspace and could see that there is a member called 'RemoveCloudWorkspace' as shown in below screenshot. Try to leverage that and see if it helps you to accomplish your requirement.

image

As I haven't got any response with a document link that you are referring to, so I will be closing this issue now.

vboyev-MSFT commented 5 years ago

Sorry for the delayed response. Thank you for your efforts, Krishnag. The link I was providing feedback to specifically was the ASC onboarding docs https://docs.microsoft.com/en-us/azure/azure-monitor/platform/agent-windows#install-the-agent-using-the-command-line

I work with many enterprise scale customers that have many thousands of servers and they come to this page to onboard ASC (https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/configure-server-endpoints ) - which is also the link the MDATP page for onboarding servers refers to , and the first comment is that they aren't going to use GUI to install or update the MMA, which leads to how do you script the addition of a workspace to MMA?

After months of looking, I finally found an official reference at https://docs.microsoft.com/en-us/azure/azure-monitor/platform/agent-manage#remove-a-workspace-using-powershell

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/agent-manage#add-a-workspace-in-azure-commercial-using-PowerShell

If I were master of the universe, anypage that refers to installing the OMS Agent/MMA/Azure Monitor Agent/Azure Security Center Agent/Azure Log Analytics Agent should have a reference to scripting the addition and removal of a ALA workspaces.