OperationsManager (SCOM) Load Balance Agents via Powershell

 I've found SCOM agent load balancing to be tedious and lacking from the Operations Console. I've created this script that uses an input parameter of a resource pool and management server, along with a batch limit to automatically load balance the agents associated with that re

59 times
Add to favorites
System Center
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • Failed to enumerate management servers
    1 Posts | Last post October 03, 2018
    • Failed to enumerate management servers.
      At D:\Scripts\SCOM-LoadBalancing\1.0.0\Public\SCOM-LoadBalance-Agents.ps1:50 char:9
      +         Throw "Failed to enumerate management servers."
      +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (Failed to enumerate management servers.:String) [], RuntimeException
          + FullyQualifiedErrorId : Failed to enumerate management servers.
      What is "Get-MSServerInfo" in Line 47?
      $MSServerArray = Get-MSServerInfo -ConnectionServer $ConnectionServer -ResourcePool $ResourcePool
  • Load Balancing in HA
    2 Posts | Last post March 05, 2018
    • Hi Demcher,
      Thanks for the great script and post. I have a question for you. We currently have 5 MS in 1 site and 5 MS in another site which is our HA site. We have 2 agent pool defined. The first one is for our primary site and the 2nd one if for our HA site. We only want to move our SCOM agent to the HA site pool if our Primary pool is down. How would you accomplish this?
      I believe in your script we can only specify  pool?
    • Hi George,
      The module I wrote is designed to load balance agents against a single resource pool. What you can do is get all of the agents in your primary pool, move them to one of the management servers in your failover pool and then run the load balancing module against the failover pool. It would look something like this:
      $PrimaryPool = Get-SCOMResourcePool 'Primary Pool'
      $Agents = $PrimaryPool | Get-SCOMAgent
      $HAManagementServer = Get-SCOMManagementServer 'HA Server'
      Set-SCOMParentManagementServer -PrimaryServer $HAManagementServer -FailoverServer $Null -Agent $Agents
      Once this finishes, you can proceed to run the SCOM-LoadBalancing module against the HA pool.
      Hope this helps!