How to Configure SCOM 2007 Agent Failover to Multiple Gateway Servers

How to Configure SCOM 2007 Agent Failover to Multiple Gateway Servers

Primary : XYZ01.com
Secondary : XYZ02.com

$primaryMS = Get-ManagementServer | where {$_.Name –eq ‘XYZ01.com’}
$failoverMS = Get-ManagementServer | where {$_.Name –eq ‘XYZ02.com’}
$agent = Get-Agent | where {$_.PrimaryManagementServerName -eq ‘XYZ01.com’}
Set-ManagementServer -AgentManagedComputer: $agent -PrimaryManagementServer: $primaryMS -FailoverServer: $failoverMS

———————————————————————————

$primaryMS = Get-SCOMManagementServer | where {$_.Name –eq ‘XYZ02.com’}
$failoverMS = Get-SCOMManagementServer | where {$_.Name –eq ‘XYZ01.com’}
$agent = Get-SCOMAgent | where {$_.PrimaryManagementServerName -eq ‘XYZ02.com’}
Set-ManagementServer -AgentManagedComputer: $agent -PrimaryManagementServer: $primaryMS -FailoverServer: $failoverMS

—————————————————————————————————

Please use the below standard syntax

$primaryMS = Get-SCOMManagementServer –Name “<name of primary server>”
$failoverMS = Get-SCOMManagementServer –Name “<name of 1st failover>”,”<name of 2nd failover>”,…,”<name of nth failover>”
$agent = Get-SCOMAgent –Name “<name of agent>”

Set-SCOMParentManagementServer –Agent $agent –PrimaryServer $primaryMS
Set-SCOMParentManagementServer –Agent $agent –FailoverServer $failoverMS

Advertisements