Menu Close

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 'yourspecialsnowflake.domain.com'} $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()

Leave a Reply

Your email address will not be published.