Using SCOM Command Shell to Configure Gateway Server Failover to Multiple Management Servers
In my previous post, I discussed how to configure Agent Failover Between Multiple Gateway Servers using PowerShell. Today, I am going to show an example as to how to configure Gateway Server failover to Multiple Management Servers.
$PrimaryMS = Get-ManagementServer | Where { Your Filter Here}
$failoverMS = Get-ManagementServer | Where { Your Filter Here}
$gatewayMS = Get-ManagementServer | Where { Your Filter Here}
Set-ManagementServer -GatewayManagementServer: $gatewayMS -ManagementServer: $PrimaryMS -FailoverServer: $failoverMS
You could see that this is very similar to my previous script – there is only one line difference. -GatewayManagementServer: $gatewayMS