{"id":831,"date":"2009-07-24T12:00:22","date_gmt":"2009-07-24T10:00:22","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=831"},"modified":"2009-07-14T00:09:20","modified_gmt":"2009-07-13T22:09:20","slug":"ops-mgr-r2-and-multiple-gateway-servers","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=831","title":{"rendered":"Ops Mgr R2 and multiple gateway servers"},"content":{"rendered":"<p>Some time ago I posted an <a href=\"http:\/\/contoso.se\/blog\/?p=680\">article<\/a> about gateway servers, Ops Mgr R2 and Server 2008. This week I have extended that scenario by adding two more management servers and one more gateway server.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/contoso.se\/files\/gw01.jpg\" alt=\"\" width=\"205\" height=\"597\" \/><\/p>\n<p>To make this scenario work I had to configure both my gateway servers to use corp-MS03 and corp-MS02 as primary and secondary management servers. You can do that with operations manager command shell.<\/p>\n<p>Log on to a machine with command shell installed, for example a workstation. Run the following script (save it as a .ps1 script file)<\/p>\n<p><code>$primaryMS = Get-ManagementServer | where {$_.Name -eq 'corp-ms02.corp.contoso.local'}<br \/>\n$failoverMS = Get-ManagementServer | where {$_.Name -eq 'corp-r2.corp.contoso.local'}<br \/>\n$gatewayMS = Get-GatewayManagementServer | where {$_.Name -eq 'dmz01'}<br \/>\nSet-ManagementServer -GatewayManagementServer: $gatewayMS -primarymanagementserver: $primaryMS -FailoverServer: $failoverMS<\/code><\/p>\n<p>That script\u00c2\u00a0configure the gateway server, DMZ01, to use corp-MS02 as primary management server and corp-R2 as failover management server. When you run this command you have to be aware that when the current management server gets this update it will stop accepting connections from your gateway server (if it is not primary or failover management server in the new configuration). That could result in a orphaned gateway server, the gateway server is not allowed to communicate with any management server. If this happends you will have to logon to your gateway server, check <code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft Operations Manager\\3.0\\Server Management Group\\&lt;Management Group Name&gt;\\Parent Health Services\\0 <\/code>and look for the authenticationName string. You must then run the set-managementserver cmdlet again and change the management server back to the one in the register. To make sure you don\u00c2\u00b4t end up with orphaned gateway servers use your current management server as failover server in your script, then the gateway server can receive new configuration from the new failover server (current management server) and when you have confirm the configuration change, you can update the failover server for the gateway server.<\/p>\n<p>To verify that your gateway server has received the new configuration you can look in the OpsMgrConnector.Config.XML file on your Gateway server, search for Parents in the file. Default location is C:\\Program Files\\System Center operations Manager 2007\\Health Service State\\Connector Configuration Cache\\.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" src=\"http:\/\/contoso.se\/files\/gw02.JPG\" alt=\"\" width=\"594\" height=\"520\" \/><\/p>\n<p>You can also run the following command shell commands to see he primary and failover server for a gateway server<\/p>\n<p><code>Get-GatewayManagementServer | where {$_.Name -like 'DMZ01'} | Get-PrimaryManagementServer<\/code><br \/>\n<code>Get-GatewayManagementServer | where {$_.Name -like 'DMZ01'} | Get-FailoverManagementServer<\/code><\/p>\n<p>If everything looks ok, you could now run the power shell script again, and update the failoverMS to the correct failover management server.<\/p>\n<p>To configure the agent to communicate with the two gateway servers I ran the following two scripts. corp-r2 was the primary\/only management server for the agent when I started.<\/p>\n<p><code>$primaryMS = Get-GatewayManagementServer | where {$_.Name -eq 'dmz01'}<br \/>\n$failoverMS = Get-ManagementServer | where {$_.Name -eq 'corp-r2.corp.contoso.local'}<br \/>\n$agent = Get-agent | where {$_.Name -eq 'DMZ-A01'}<br \/>\nSet-ManagementServer -AgentManagedComputer: $agent -PrimaryManagementServer: $primaryMS -FailoverServer: $failoverMS<\/code><\/p>\n<p>after I verified that the agent had recived the new configuration I ran<\/p>\n<p><code>$primaryMS = Get-GatewayManagementServer | where {$_.Name -eq 'dmz01'}<br \/>\n$failoverMS = Get-gatewayManagementServer | where {$_.Name -eq 'dmz-02'}<br \/>\n$agent = Get-agent | where {$_.Name -eq 'DMZ-A01'}<br \/>\nSet-ManagementServer -AgentManagedComputer: $agent -PrimaryManagementServer: $primaryMS -FailoverServer: $failoverMS<\/code><\/p>\n<p>The result of these commands is that my agent (DMZ-A01) can communicate with both gateway servers. Both my gateway servers can communicate with both my management servers. If I shutdown DMZ01 my agent, DMZ-A01, failover to DMZ-02. If I start DMZ01 again the agent will automatic return to DMZ01. If I shutdown corp-MS02 my gateway server will automatic failover to corp-ms03. If I shutdown one gateway server and one management server the agent will still communicate with the management group.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago I posted an article about gateway servers, Ops Mgr R2 and Server 2008. This week I have extended that scenario by adding two more management servers and one more gateway server. To make this scenario work I had to configure both my gateway servers to use corp-MS03 and corp-MS02 as primary and &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=831\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[19],"tags":[],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/831"}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=831"}],"version-history":[{"count":25,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/831\/revisions"}],"predecessor-version":[{"id":856,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/831\/revisions\/856"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}