Set Agent failover between management servers

get a list of Agents from current Primary Management Server

$agents = get-agent | where {$_.PrimaryManagementServerName -eq “”}

Set the Primary Management Server

$pri = get-managementserver | where-object {$_.PrincipalName -eq “”}

Set the secondary management Server

$sec = get-managementserver | where-object {$_.PrincipalName -eq “”}

Set up failover between the management servers

set-managementserver -agentmanagedcomputer $agents -primarymanagementserver $pri -failoverserver $sec

Word of caution: Make sure the primary of the secondary is currently the actual managing server so communication stays up. rerun again if you want to change to a new server.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s