Adding direct agent OMS Workspace and Proxy via PowerShell



We have some REALLY good documentation on this here:


PowerShell and the Agent Scripting Objects make it really easy to control the OMS direct agent configuration on thousands of agents, using SCOM.


Here are some PowerShell examples:

# Load agent scripting object
  $AgentCfg = New-Object -ComObject AgentConfigManager.MgmtSvcCfg

# Get all AgentCfg methods and properties
$AgentCfg | Get-Member

# Check to see if this agent supports OMS
  $AgentSupportsOMS = $AgentCfg | Get-Member -Name 'GetCloudWorkspaces'

# Get all configured OMS Workspaces

# Add OMS Workspace

# Remove OMS Workspace

# Get the OMS proxy if configured

# Set a proxy for the OMS Agent

I added these tasks to ADD and REMOVE OMS workspaces from the MMA, in the latest version of the SCOM Management helper pack:


Comments (0)

Skip to main content