Blog
By MadHatter on 11/2/2009 5:39:50 AM • Rank (2783) • Views 2834
0

0

powershell2xa4 I had a request to update agent proxy for a group of computers, to perform a regularly scheduled update. To accommodate updating Agent Proxy for group members on a recurring basis (to get new members), Powershell was required.

I new there were a couple of scripts out here from a very long time ago, but had trouble finding them because they were posted with "Act as a Proxy" in the name for some reason. Since I may not be the only one, I wanted to post updated names here so they'll be easier for all to find.

Where to get them

Here are the download  links to the scripts

Agent Bulk Update Script

Description: A Powershell script that will enable the 'Act as a Proxy' functionality on a group of agents. This is useful when an MP requires a large number of agents to have this functionality enabled. It could also be scheduled to run on a recurring basis using Windows Task Scheduler.

Agent Proxy Bulk Update version 2

Description:**Updated to use FQDN** A Powershell script that will enable the 'Act as a Proxy' functionality on a group of agents. This is useful when an MP requires a large number of agents to have this functionality. It could also be scheduled to run on a recurring basis using Windows Task Scheduler.

 

For bulk-enabling manually on an ad-hoc basis, try Boris Y's Proxy Settings tool. There is a link to Boris blog post with the tool on our OpsMgr Community Toolbox Page at\ http://www.systemcentercentral.com/tools

 

TWITTER RSS
Comments (2) - Comment RSS
Kevin wrote: on Nov 02, 2009 02:45 AM
I also came across this problem a few months back, but took a different approach. In our environment we only use Clusters for SQL, so I was able to make the assumption that any cluster node needs to have proxying enabled. Hence, I decided to enable proxying for all objects in the Microsoft.Windows.Cluster.Service class. Here's the script to accomplish that task (which is freakishly similar to yours!) param($rootMS) $targetClass = "Microsoft.Windows.Cluster.Service"; Set-Location OperationsManagerMonitoring:: New-ManagementGroupConnection $rootMS Set-Location $rootMS $matches = Get-MonitoringClass -name $targetClass | Get-MonitoringObject | Select-Object Foreach($object in $matches) { [string]$currentAgent = $object.Path $agent = Get-Agent | Where-Object {$_.Name -eq $currentAgent} if($agent.proxyingEnabled -eq 'False') { Write-Host "$currentAgent doesn't have proxying enabled yet, enabling now" $agent.proxyingEnabled = $true; $agent.applyChanges(); } else { Write-Host "Proxying already enabled for $currentAgent, skipping..." } }
Kevin wrote: on Nov 02, 2009 02:47 AM
Ergh... no breaks :(


Who Viewed
Who Reviewed
Categories
Related Pages
Shortened URL
http://tinyurl.com/y9xl4xy

Top Contributors
Featured Members
Pete Zerger
Points: 65622
Level: System Center Expert
Tommy Gunn
Points: 42748
Level: System Center Expert
Simon Skinner
Points: 40804
Level: System Center Expert
Stefan Koell
Points: 28999
Level: System Center Expert
Andreas Zuckerhut
Points: 27734
Level: System Center Expert