How to set Agent proxy enabled for all agents in SCOM 2012

 

Here is an updated PowerShell script that can be used to set agent proxy in SCOM 2012.

 

param ($MSSvr)
Import-Module -Name "OperationsManager"
New-SCManagementGroupConnection -ComputerName:$MSSvr;

## set proxy enabled for all agents where it is disabled
$NoProxy = get-SCOMagent | where {$_.ProxyingEnabled -match "False"}
$NoProxy|foreach {$_.ProxyingEnabled=$true}
$NoProxy|foreach {$_.ApplyChanges()}

 

Download: setproxyenabled12.txt

To run from a PowerShell Command Prompt you need to supply parameter MSSvr

 

It would look something like this.  

.\setproxyenabled12.ps1 -MSSvr "OM01.scom2k7.com"

image

 

Kevin Homan has an excellent post from SCOM 2007 on why you would want to do this.  http://blogs.technet.com/b/kevinholman/archive/2010/11/09/how-to-set-agent-proxy-enabled-for-all-agents.aspx

No comments yet.

Leave a Reply