SCOM: two gateway in same domain, how to migrate agents

Forum: Operations Manager4
Viewing 5 posts - 1 through 5 (of 5 total)
  • #230200


    Hello, I have 2 Management Server on main domain (MS1 and MS2 on domain and I have a Gateway for monitoring another untrested domain (

    the GW01 has another roles (often Is needed to reboot this server by others teams, while the reboot and other actions sometimes I lost the main role “SCOM GW” because the server is down) for this reason I want to have another GW02 with same specs that GW01.

    I create and install a enw server called GW02 on domain ( connected to my ( with a ertificates and I did all the things needed, and seems to be OK.

    The problem is when I move some agent from GW01 from the Administration Console to GW02,  agents moves well, but at 10 minutes, they appears in grey. (most of them) and the only way to comeback to green state is moving again to the old GW01.

    What Im doing wrong?? Why agents in the GW01 work fine and when I try to move to GW02 stop working at 10 minutes aprox. (the firewall rules are the same  in both GW) and the port 5723 is open in all directions.

    The idea is to have high availability in the untrusted domain , using GW01 and GW02. (like a cluster) How can I do this?

    Any help will be apreciate!

    Best Regards












    Before changing management server for an agent managed by a GW you will have to setup the new GW as a failover management server.

    You have to use PowerShell for that.




    fully agree with Perf. Here the complete script you need to use:

    How to Configure Agent Failover to Multiple Gateway Servers




    Thank u very much, I tried the proposal of @PerJ and works fine.

    I dont know u can configure another Gateway as a Main $primaryMS server.

    After configure this, now Im able to change agents between GW.




    Microsoft.EnterpriseManagement.Administration.AgentManagedComputer class which can be invoked by Get-SCOMAgent cmdlet has method SetManagementServers.

    You should create list of secondary servers, it can be an empty list:

    $SecondaryManagementServers = New-Object System.Collections.Generic.List[Microsoft.EnterpriseManagement.Administration.ManagementServer]

    And populate it by your own rules:

    Get-SCOMManagementServer | ? {$_ <here is your own conditions>} | % {$SecondaryManagementServers.Add($_)}

    $PrimaryManagementServer = Get-SCOMManagementServer -Name “<fqdn>”

    After it you can invoke method SetManagementServers, as example:

    Get-SCOMAgent | % {$_.SetManagementServers($PrimaryManagementServer, $SecondaryManagementServers)}

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.