<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx</link><description>&amp;#160; UPDATE:&amp;#160; Some of these commands have been changed for OpsMgr 2012, so I’ve created updated scripts at the bottom of this post that should work in 2012. I’ve assisted a few customers with configuring Gateway Servers/Agents for failover lately</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3574070</link><pubDate>Wed, 22 May 2013 08:43:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3574070</guid><dc:creator>Ravigu</dc:creator><description>&lt;p&gt;How many MS/Gw can be configured as failover? Do we have any limit for this ?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3574070" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3562692</link><pubDate>Tue, 02 Apr 2013 14:35:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3562692</guid><dc:creator>Jimmy Harper</dc:creator><description>&lt;p&gt;That would work, but even if you keep the GWs pointed at the primary during the upgrade, they will failover to the secondary whenever they can&amp;#39;t connect to the Primary.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3562692" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3562136</link><pubDate>Mon, 01 Apr 2013 14:09:27 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3562136</guid><dc:creator>Sridhar</dc:creator><description>&lt;p&gt;Yes , indeed it worked .. thanks .&lt;/p&gt;
&lt;p&gt;I have 2 MS in my environment and 4 GW&amp;#39;s . All my GW are connected to Primary MS and secondary as failover.&lt;/p&gt;
&lt;p&gt; I am planning to upgrade scom 2012 to SP1 , would this approach work , if I don&amp;#39;t need monitoring to be hampered at any point in time :&lt;/p&gt;
&lt;p&gt;Move all GW to secondary MS and then patch Primary , reboot etc . Then move all GW&amp;#39;s back to primary MS and patch secondary MS . &lt;/p&gt;
&lt;p&gt;Let me know your thoughts on this.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3562136" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3560442</link><pubDate>Fri, 22 Mar 2013 16:44:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3560442</guid><dc:creator>Jimmy Harper</dc:creator><description>&lt;p&gt;What you will need to do here is first set the Failover MS to nothing...do this by using a server name that does not exist:&lt;/p&gt;
&lt;p&gt;$failoverMS = Get-SCOMManagementServer | where {$_.Name –eq &amp;#39;FAKE_SERVER_NAME.DOMAIN.COM&amp;#39;} &lt;/p&gt;
&lt;p&gt;Now, run the &amp;quot;Verify&amp;quot; commands to verify that the Primary MS is still the same and the Failover MS is empty.&lt;/p&gt;
&lt;p&gt;Now proceed with the original commands to set Primary/Failover.&lt;/p&gt;
&lt;p&gt;There may be a better way to do this, but this is what I came up with in my lab and it seemed to work as expected...test on one of the GWs first to verify.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3560442" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3560369</link><pubDate>Fri, 22 Mar 2013 11:09:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3560369</guid><dc:creator>Sridhar</dc:creator><description>&lt;p&gt;I have 2 MS and 6 GW that all report to primary MS (MS1) . I configured my gateways to primary (MS1) and secondary management servers (MS2) few days back. Now , we need to spread the load of GW half to MS1 as their primary ( for which MS2 would be &amp;nbsp;failover) and remaining half to MS2 as their primary (for which MS1 would be failover) . Can we do this?&lt;/p&gt;
&lt;p&gt;If I run the command for this configuration I get the error &amp;quot;the failover MS can not be the same as primary&amp;quot;.&lt;/p&gt;
&lt;p&gt;I belive this is due to my earlier configuration where we had all GW reporting to MS1 as primary and MS2 as secondary . How can I now distribute the GW load equally between 2 management server ?&lt;/p&gt;
&lt;p&gt;Help ..!! &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3560369" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3556575</link><pubDate>Tue, 05 Mar 2013 17:24:33 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3556575</guid><dc:creator>Jimmy Harper</dc:creator><description>&lt;p&gt;The PowerShell commands can be run from any computer that has the SCOM Command Shell installed...it does not need to be run from an Agent. &amp;nbsp;I usually use one of the Management Servers.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3556575" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3556571</link><pubDate>Tue, 05 Mar 2013 17:16:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3556571</guid><dc:creator>Narayn</dc:creator><description>&lt;p&gt;How do I configure failover on an agent where PowerShell is not available. For example if PowerShell is not already installed. By default the SCOM agent does not appear to install any PowerShell cmdlets.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3556571" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3523966</link><pubDate>Wed, 03 Oct 2012 12:39:43 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3523966</guid><dc:creator>Stefan Roth</dc:creator><description>&lt;p&gt;Excellent post! &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3523966" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3523893</link><pubDate>Wed, 03 Oct 2012 00:12:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3523893</guid><dc:creator>Jimmy Harper</dc:creator><description>&lt;p&gt;Thanks Jonathan and Joe....I&amp;#39;ve updated the OpsMgr 2012 command to use -PrimaryServer and use separate lines for setting primary and failover.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3523893" width="1" height="1"&gt;</description></item><item><title>re: Powershell Commands to configure Gateway Server / Agent Failover</title><link>http://blogs.technet.com/b/jimmyharper/archive/2010/07/23/powershell-commands-to-configure-gateway-server-agent-failover.aspx#3523867</link><pubDate>Tue, 02 Oct 2012 22:42:39 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3523867</guid><dc:creator>Jonathan</dc:creator><description>&lt;p&gt;Were you able to get this to work in 2012?&lt;/p&gt;
&lt;p&gt;#Agents reporting to GATEWAY_1 - Failover to GATEWAY_2 &lt;/p&gt;
&lt;p&gt;$primaryMS = Get-SCOMManagementServer | where {$_.Name –eq &amp;#39;GATEWAY_1.DOMAIN.COM&amp;#39;} &lt;/p&gt;
&lt;p&gt;$failoverMS = Get-SCOMManagementServer | where {$_.Name –eq &amp;#39; GATEWAY_2.DOMAIN.COM&amp;#39;} &lt;/p&gt;
&lt;p&gt;$agent = Get-SCOMAgent | where {$_.PrimaryManagementServerName -eq &amp;#39;GATEWAY_1.DOMAIN.COM&amp;#39;} &lt;/p&gt;
&lt;p&gt;Set-SCOMParentManagementServer -Agent: $agent -PrimaryManagementServer: $primaryMS -FailoverServer: $failoverMS&lt;/p&gt;
&lt;p&gt;I get an error. Seems we need to execute set- once for primary, then again for failover.&lt;/p&gt;
&lt;p&gt;Also, I think -PrimaryManagementServer has changed to -PrimaryServer.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3523867" width="1" height="1"&gt;</description></item></channel></rss>