<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>One more maintenance mode script</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx</link><description>Attached is a script that takes a group and puts all the computers in the group (as well as the health service and the healthservice watcher) into maintenance mode. Here is how you can run the script from the command line to start or stop maintenance</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Ace DDL &amp;raquo; OpsMgr2007: Scheduling Groups of Objects for Maintenance Mode</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8050852</link><pubDate>Wed, 05 Mar 2008 14:04:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8050852</guid><dc:creator>Ace DDL » OpsMgr2007: Scheduling Groups of Objects for Maintenance Mode</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://aceddl.cn/x/opsmgr2007-scheduling-groups-of-objects-for-maintenance-mode.jsp"&gt;http://aceddl.cn/x/opsmgr2007-scheduling-groups-of-objects-for-maintenance-mode.jsp&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Maintenance mode targeting</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8335970</link><pubDate>Tue, 25 Mar 2008 18:31:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8335970</guid><dc:creator>geist_23</dc:creator><description>&lt;p&gt;Boris,&lt;/p&gt;
&lt;p&gt;I have used the maintenance mode scripts that target a group and that works great. &amp;nbsp;I have created a scheduled task and scheduled it to run against the ‘Maintenance Mode All Computers” Group which is really based on a dynamic formula that simply states: “Object is Microsoft Windows Computer” = True.&lt;/p&gt;
&lt;p&gt;All 500 servers go into maintenance mode.&lt;/p&gt;
&lt;p&gt;Then one day someone told me that they need their particular server in maintenance mode at a different time! Why would anyone want to have their servers go into maintenance mode at a different time? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the dilemma: How to make this all dynamic and not manually explicit.&lt;/p&gt;
&lt;p&gt;Group creation can explicitly exclude individual objects.&lt;/p&gt;
&lt;p&gt;Group creation cannot reference membership of one group and dynamically exclude it. This is quite a problem.&lt;/p&gt;
&lt;p&gt;So then I though there must be a way create to a class with an expression that weeds out unwanted servers that need to be in a different maintenance schedule.&lt;/p&gt;
&lt;p&gt;One thing is true. All servers that need to be in alternate maintenance schedules will enjoy the benefit of having their own hosted class.&lt;/p&gt;
&lt;p&gt;Therefore, I have a created a hosted (registry type) class that identifies the servers that need to have a different maintenance window:&lt;/p&gt;
&lt;p&gt;&amp;lt;Configuration&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ComputerName&amp;gt;$Target/Property[Type=&amp;quot;Windows!Microsoft.Windows.Computer&amp;quot;]/NetworkName$&amp;lt;/ComputerName&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;RegistryAttributeDefinitions&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;RegistryAttributeDefinition&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AttributeName&amp;gt;UTSCheck&amp;lt;/AttributeName&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Path&amp;gt;SYSTEM\CurrentControlSet\Control\Session Manager\Environment\DFC_Service\UTS&amp;lt;/Path&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;PathType&amp;gt;0&amp;lt;/PathType&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;AttributeType&amp;gt;0&amp;lt;/AttributeType&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/RegistryAttributeDefinition&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/RegistryAttributeDefinitions&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;Frequency&amp;gt;600&amp;lt;/Frequency&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ClassId&amp;gt;$MPElement[Name=&amp;quot;DFC.APP.UnifiedTicketingSystem.Base&amp;quot;]$&amp;lt;/ClassId&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;InstanceSettings&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Settings&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Setting&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Name&amp;gt;$MPElement[Name=&amp;quot;Windows!Microsoft.Windows.Computer&amp;quot;]/PrincipalName$&amp;lt;/Name&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Value&amp;gt;$Target/Property[Type=&amp;quot;Windows!Microsoft.Windows.Computer&amp;quot;]/PrincipalName$&amp;lt;/Value&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Setting&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Settings&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/InstanceSettings&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;Expression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;SimpleExpression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ValueExpression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;XPathQuery Type=&amp;quot;String&amp;quot;&amp;gt;Values/UTSCheck&amp;lt;/XPathQuery&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/ValueExpression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Operator&amp;gt;Equal&amp;lt;/Operator&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ValueExpression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Value Type=&amp;quot;String&amp;quot;&amp;gt;True&amp;lt;/Value&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/ValueExpression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/SimpleExpression&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/Expression&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/Configuration&amp;gt;&lt;/p&gt;
&lt;p&gt;Now how do I create a class that contains all my servers minus the UTS servers?&lt;/p&gt;</description></item><item><title>re: One more maintenance mode script</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8339933</link><pubDate>Thu, 27 Mar 2008 19:11:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339933</guid><dc:creator>Nick M</dc:creator><description>&lt;p&gt;Excellent script Boris - just a quick question, does the group need to be based on the Windows Server object, or can it be any subset? For example, a dynamic list based on Logical disks?&lt;/p&gt;</description></item><item><title>re: One more maintenance mode script</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8342654</link><pubDate>Sat, 29 Mar 2008 03:47:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8342654</guid><dc:creator>Boris Yanushpolsky</dc:creator><description>&lt;p&gt;I dont think you can exclude a group from another group's definition. What you can do is create another class and create a discovery for this class (instances of this class would be the onces that need to go in MM at the same time). Then include only this class in the group.&lt;/p&gt;
</description></item><item><title>re: One more maintenance mode script</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8345667</link><pubDate>Mon, 31 Mar 2008 17:14:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8345667</guid><dc:creator>geist_23</dc:creator><description>&lt;p&gt;&amp;quot;Then include only this class in the group.&amp;quot;&lt;/p&gt;
&lt;p&gt;Ultimately, this would fail me as inevitably server instances will be a part of more than one class that I define for maintenanec mode.&lt;/p&gt;</description></item><item><title>A Great place for SCOM scripts</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8727940</link><pubDate>Sun, 13 Jul 2008 14:08:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8727940</guid><dc:creator>Dario IT Solutions Blog</dc:creator><description>&lt;p&gt;Check out Boris Yanushpolsky&amp;amp;#39;s blog ( &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/boris_yanushpolsky"&gt;http://blogs.msdn.com/boris_yanushpolsky&lt;/a&gt; ). Boris is an SCOM&lt;/p&gt;
</description></item><item><title>SCOM 2007 Useful Links</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#8974034</link><pubDate>Thu, 02 Oct 2008 20:57:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8974034</guid><dc:creator>Dario IT Solutions Blog</dc:creator><description>&lt;p&gt;Main Downloads page (catalog, documentation) &lt;a rel="nofollow" target="_new" href="http://technet.microsoft.com/en-us/opsmgr/bb498232.aspx"&gt;http://technet.microsoft.com/en-us/opsmgr/bb498232.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Les meilleurs liens OPSMGR 2007</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#9446850</link><pubDate>Thu, 26 Feb 2009 19:22:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9446850</guid><dc:creator>Blog Opsmgr / SCOM 2007, and Windows 2008 , Seven ...in french</dc:creator><description>&lt;p&gt;&amp;amp;#160; Voici une liste de liens tr&amp;#233;s pratique sur tous les sujets SCOM , installation , configuration...&lt;/p&gt;
</description></item><item><title>Rights in the OpsMgr Shell</title><link>http://blogs.msdn.com/boris_yanushpolsky/archive/2008/03/04/one-more-maintenance-mode-script.aspx#9615147</link><pubDate>Thu, 14 May 2009 11:15:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9615147</guid><dc:creator>Mark Wolzak</dc:creator><description>&lt;p&gt;Our servicedesk is using an adapted version of the GroupMaintenancemode -script from Boris Yanushpolski&lt;/p&gt;
</description></item></channel></rss>