Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

OpsMgr 2012: Enable agent proxy on all agents

OpsMgr 2012: Enable agent proxy on all agents

  • Comments 14
  • Likes

 

 

Turn on agent proxy for all agents where it is disabled:

get-SCOMagent | where {$_.ProxyingEnabled -match "False"} | Enable-SCOMAgentProxy

Turn on agent proxy as a default setting for all new agents to be deployed, never to have to mess with this again:

add-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client"; new-managementGroupConnection -ConnectionString:scomserver.domain.com; set-location "OperationsManagerMonitoring::"; Set-DefaultSetting -Name HealthService\ProxyingEnabled -Value True

Thanks for Daniele Muscetta and John Erskine for the references on the default-setting.

Comments
  • When will the scom team provide proper powershell support? 2012 seems better but still seems like it's bolted on afterwards instead of being created properly.

  • In what context specifically do you mean?

  • This would be ideal, but it doesn't work and you have go back to text based matching/parsing to get things to work. just a rant Get-SCOMAgent | where {!$_.proxyEnabled} | Enable-SCOMAgentProxy or Get-SCOMAgent -ProxyEnabled:$false

  • Set-DefaultSetting -Name HealthService\ProxyingEnabled -Value True It´s not a Cmdlet in SCOM 2012 anymore.

  • @U - Yes, it is. You must load the snap-in I display in the code sample.

  • Testing the set-defaultsetting in SCOM 2012 R2 UR1 doesn't work in my environment. It looks, that "set-Defaultsetting" doesn't accept the parameter "-name", instead "-path" is requested.

  • Update: PS Microsoft.EnterpriseManagement.OperationsManager.Client\OperationsManagerMonitoring::> Set-DefaultSetting -Name HealthService\Proxyingenabled -Value True Set-DefaultSetting : A default setting with a name matching the 'Name' parameter was not found. At line:1 char:1 + Set-DefaultSetting -Name HealthService\Proxyingenabled -Value True + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Enter...ltSettingCmdlet:GetDefaultSettingCmdlet) [Set-DefaultSetting], ArgumentOutOfRangeException + FullyQualifiedErrorId : InvalidParameter,Microsoft.EnterpriseManagement.OperationsManager.ClientShell.GetDefaultSettingCmdlet

  • Works perfectly with SCOM 2012 SP1 UR3, thanks Kevin

  • I re-verified this working on SCOM 2012 R2 with UR1. Willi - your issue is your typing - try a copy and paste of my actual commands. These are case sensitive and you used a lower case "e" in "ProxyingEnabled"

  • Hi Kevin, thanx for the hint (I didn't care about case sensitivity of parameters and the error message does not lead to the real issue).

  • Kevin, what's the benefit and/or penalty of turning on the proxy for all agents?

  • @Eric - glad you asked.

    Agent proxy setting allows an agent to submit data on behalf of someone else. This is like an agent submitting data for a cluster node, or about an instance that it might not be hosting. This was turned off by default as an "added" security measure, to keep someone from maliciously installing an agent on a server in your management group, and then submitting "spoofed" data. As you can imagine, what a rare condition/risk that would be! Almost every major role in SCOM requires that agent proxy be enabled/allowed, such as Exchange, Domain Controllers, Clusters, SharePoint, etc... These are often the MOST CRITICAL servers in the company. In my opinion, if we can trust these servers to agent proxy, it isn't some great risk. 99% of all deployment just enable agent proxy wherever it is needed/requested, with very little validation if at all. Other customers are running scripts multiple times a day to find all agents that don't have it enabled, and just turn it on, to reduce the administrative overhead of dealing with this in SCOM. Therefore, when you build a new management group, it is quite convenient to simply enable this agent proxy setting as a default setting, so that all NEW agents added to the Management group will inherit this as a default initial setting and you will not have to deal with it.

  • Thankyou kavin, but I am afraid that runing this command will not enable proxies for my other agents except the one managment server for which I am getting this alert?
    Pls help

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs