# Begin scriptTo use this, simply paste it into an Operations Manager PowerShell session.
get-agent | ? { $_.Name -Like '*dc*' } | foreach {
$_.name;
$_.ProxyingEnabled = $True;
$_.ApplyChanges();
$_.ProxyingEnabled
}
# End script
It will enable agent proxy for all agents that have a name like “*dc*”. Before running this, it’s best to run the following one-liner to make sure you will change the correct agents:
get-agent | ? { $_.Name -Like '*dc*' } | ft NameThis should speed things up when you need to enable agent proxy for lots of agents. Exchange servers and AD domain controllers immediately spring to mind..