How to change the SCOM agent heartbeat interval in PowerShell


Perhaps you have a special group of servers that are on poorly connected network segments, but most of your servers are in datacenters.  You may want to set the default heartbeat interval higher for these specific agents, so they are less likely to create heartbeat failures.  You can do this easily in the UI, but there isn't a simple cmdlet to do this for a group of agents.

Here is a method you can use:

$agent = get-scomagent | where {$_.DisplayName -eq ''} $agent.HeartbeatInterval = 360 $agent.ApplyChanges()


In this example – you might set this differently for all the agents in your DMZ domain:

$agents = get-scomagent | where {$_.domain -eq 'DMZ'} foreach ($agent in $agents) { $agent.HeartbeatInterval = 360 } $agent.ApplyChanges()

Comments (4)

  1. Tommy says:

    Hi Kevin,
    Shouldn’t ApplyChanges be part of the foreach loop in the second example?

    Anyhow, i used this ,based on your blog, to apply this for a group of servers 🙂

    $computers = Get-SCOMGroup -DisplayName “somegroupname” | Get-SCOMClassInstance

    $agents = @()
    foreach ($computer in $computers)
    $agent = get-scomagent | where {$_.DisplayName -eq $computer}
    $agents += $agent

    foreach ($agent in $agents)
    $agent.HeartbeatInterval = 120

  2. Huss_Rah says:

    Hi i have a question regarding the agent on servers. How can i tell which version number equals CU9,8,7 etc? When i run get-scomagent in the version number field i see 7.1.10184…


    1. Kevin Holman says:

      I cover this question in all my blog posts on UR’s. The agent version number is a major version number and does not reflect UR level.
      To see UR level – we have a specific view in the console for that already…. see one of my UR posts for the example.

Skip to main content