Multi-Home OMS Agent using powershell

You can run below script on the VM iteself to talk to multiple workspaces. One Microsoft Monitoring Agent can talk to upto 4 workspaces. You can embed this into Remote PS-Session if you want to use PSRemoting.

#Enumerate workspace details. 
$workspaces = @(
     #First Workspace
    ("WorkspaceID", "Key"), `
     #Second Workspace
    ("WorkspaceID", "Key"), `
     #Third Workspace
    ("WorkspaceID", "Key")
#Add workspaces
           foreach ($workspace in $workspaces) {

           Write-Host " Working on Workspace $workspaces[0]"
                             $mma = New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg'
                             $mma.AddCloudWorkspace($workspace[0], $workspace[1])