<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>teknoglot: &#187; OpsMgr</title>
	<atom:link href="http://www.teknoglot.se/tag/opsmgr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.teknoglot.se</link>
	<description>Techspeak for the socially diminished</description>
	<lastBuildDate>Fri, 18 May 2012 12:28:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Load-balanced SCOM2012 SDK Services for Network Illiterates [#opsmgr, #nlb]</title>
		<link>http://www.teknoglot.se/ms/opsmgr2012/load-balanced-scom2012-sdk-services-for-network-illiterates-opsmgr-nlb/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2012/load-balanced-scom2012-sdk-services-for-network-illiterates-opsmgr-nlb/#comments</comments>
		<pubDate>Fri, 18 May 2012 12:16:51 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2012]]></category>
		<category><![CDATA[Highly-Available]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[NLB]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.teknoglot.se/?p=639</guid>
		<description><![CDATA[Prelude Now that System Center Operations Manager no longer has that pesky Root Management Server role; a server role that in larger environments quickly became the choking point and made creating a fully Highly-Available SCOM-environment both complex and frustrating to maintain and with little gain at that. With that gone and the SDK Service, or [...]]]></description>
			<content:encoded><![CDATA[<h2>Prelude</h2>
<p>Now that System Center Operations Manager no longer has that pesky Root Management Server role; a server role that in larger environments quickly became the choking point and made creating a fully Highly-Available SCOM-environment both complex and frustrating to maintain and with little gain at that. With that gone and the SDK Service, or Data Access Service, thriving on all of the Management Servers HA suddenly became pretty simple. All you have to do in SCOM2012 to make sure your management groups keep on kicking is to have at-least two Management Servers and your databases clustered.</p>
<p>This new distributed architecture does not only give easy HA, it also makes it possible to connect to the SDK-service—be it using the Operations Console or powershell to name two options—on <em>any</em> Management Server. This, in turn, provides for a completely new level of scalability. Choked on sessions? Deploy a new Management Server!</p>
<p>Anyway… given all this scalability and HA, would it not be nice if you could load-balance all these SDK-sessions you are going to be running from System Center Virtual Machine Manager, System Center Service Manager, System Center Orchestrator, regular scheduled powershell scripts and what-not?</p>
<p>Of course it would! And you can! The simple solution is to use the built-in Network Load Balancer (NLB for short) feature in Windows Server and that&#8217;s what we&#8217;re going to discuss in this post.<br />
Before we go, I&#8217;d like to point to a <a href="http://systemcentertech.com/2012/02/07/load-balance-scom-2012-operations-console-connections/">great article</a> written by <a href="http://systemcentertech.com/">Justin Cook</a> that is covering most bases but in a less for-dummies manner. So, yeah… I suppose this is the for-dummies version then. <img src='http://www.teknoglot.se/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Enjoy!</p>
<h2>Prerequisites</h2>
<p>We need to have the Network Load Balancing feature installed on all our targeted Management servers. The quick way to do this is using command-line (Windows Server 2008 R2 or later?).</p>
<pre class="brush: plain; title: ; notranslate">dism /online /enable-feature /featurename:NetworkLoadBalancingFullServer </pre>
<p>You also need a plan and some information about your new cluster. Make sure you have identified the following parameters before starting the configuration:</p>
<div>
<table style="border-collapse: collapse;" border="0">
<colgroup>
<col style="width: 307px;" />
<col style="width: 307px;" /></colgroup>
<tbody valign="top">
<tr>
<td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;">A Dedicated Cluster IP-Address:</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">A Dedicated Cluster DNS Name:</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">A list of SCOM2012 Management Servers:</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"></td>
</tr>
</tbody>
</table>
</div>
<p>You can use this pre-flight table to take note of your IP-address, DNS Name and Server List.</p>
<h2>Create a New Cluster</h2>
<p>Open the Network Load Balancing Manager and create a new cluster.</p>
<p><img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance1.png" alt="" /></p>
<p>In the &#8220;New Cluster&#8221; dialogue, connect to one of your Management Servers.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance2.png" alt="" /></p>
<ol>
<li>Enter the name of a management server</li>
<li>Click Connect</li>
<li>Select the network interface to use</li>
<li>Click Next</li>
</ol>
<p>Select the settings on your first host in the cluster.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance3.png" alt="" /></p>
<ol>
<li>Make sure it&#8217;s the correct IP-address.</li>
<li>Click Next</li>
</ol>
<p>Set the Cluster IP-address.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance4.png" alt="" /></p>
<ol>
<li>Click Add</li>
<li>Enter your Dedicated Cluster IP-Address and Subnet mask</li>
<li>Click OK</li>
<li>Click Next</li>
</ol>
<p>If another IP-address is needed, like an IPv6 address, you simply repeat step 1-3 before proceeding to step 4.</p>
<p>Edit DNS Names and Cluster Operation Mode.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance5.png" alt="" /></p>
<ol>
<li>Select your Dedicated Cluster IP-address</li>
<li>Enter your chosen Dedicated Cluster DNS Name</li>
<li>Select Multicast mode</li>
<li>Click Next</li>
</ol>
<blockquote><p>Note: We are not going to delve into the Cluster Operation Mode in this guide, but this is what I use for Operations Manager 2012.<br />
If you are interested, here&#8217;s the KB on the various settings: <a href="http://support.microsoft.com/kb/323437">http://support.microsoft.com/kb/323437</a></p></blockquote>
<p>Set your Port Rules and Affinity Settings.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance6.png" alt="" /></p>
<ol>
<li>Verify that Affinity is set to &#8220;Single&#8221;. If not, Click &#8220;Edit…&#8221; and adjust.</li>
<li>Click Finish</li>
</ol>
<blockquote><p>Note: &#8220;Single&#8221; affinity tells the cluster to always direct the same client to the same host if possible. This is required to be able to maintain sessions.<br />
In the world of NLB, a &#8220;client&#8221; is an IP-address.</p></blockquote>
<h3>Post-Configuration</h3>
<p>Now that you have a cluster configured you have to make sure your SDK-clients are able to resolve the dedicated cluster DNS-name. The one you picked in the pre-flight table.</p>
<p>To enable name resolution you have to add your cluster DNS-name to your DNS-zone and point it to your dedicated cluster IP-address. Make it an A-record and it should work.</p>
<p>If you intend to use the cluster name from outside the local network or subnet—Operation Consoles or Powershell sessions for example—you would also need to verify that the router is able to handle the multicast packages. I am by no means a network guy, but asking the person behind that &#8220;Don&#8217;t blame the network&#8221; sign to help you access a NLB cluster on network <em>X </em>from network <em>Y</em> usually works. One way to troubleshoot this is to ping the cluster DNS-name from one of the hosts. If that works but you are still unable to ping from another network or subnet, then it might be a router setting.</p>
<h2>Adding Hosts to the Cluster</h2>
<p>With the cluster configured and up-and-running you need to add the rest of the Management Servers. Repeat this section for each Management Server you wish to add to the load-balancing cluster.</p>
<p>In the Network Load Balancing Manager, right-click your cluster and select &#8220;Add Host To Cluster&#8221;.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance7.png" alt="" /></p>
<p>Connect to your next Management Server to be added<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance8.png" alt="" /></p>
<ol>
<li>Enter the servername of the Management Server (&#8220;host&#8221; in cluster terminology)</li>
<li>Click Connect</li>
<li>Select the IP-address of the host</li>
<li>Click Next</li>
</ol>
<p>Verify your Host Parameters<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance9.png" alt="" /></p>
<ol>
<li>Doublecheck the IP-address</li>
<li>Click Next</li>
</ol>
<p>Verify the Port Rules<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance10.png" alt="" /></p>
<ol>
<li>Make sure that Load is Equal and Affinity is Single</li>
<li>Click Finish</li>
</ol>
<h2>Final Verification</h2>
<p>After each added host it would be proper to check if it was added correctly. The easiest way is to check their statuses in the Network Load Balancing Manager. Green is generally considered good and you want your hosts to be &#8220;Converged&#8221;.<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/05/051812_1216_Loadbalance11.png" alt="" /></p>
<p>Another way to verify functionality is to point your Operations Manager console to the Cluster DNS-name instead and connect. If you are in a lab or in an environment where it happens to be OK to shut down Management Servers you could try that as well.</p>
<p>Considering my note on routers in the Cluster Post-Configuration I guess it would be prudent to point out that you should test to launch SDK-sessions from all networks you intend to connect from to make sure that your routers are configured to handle these kinds of sessions.</p>
<h2>Postlude</h2>
<p>Now; as easy this may be I would personally argue that you should involve your network team <em>before</em> starting to deploy your load-balanced clusters. A little heads-up is always a good thing—I have noticed that network people rarely like surprises—and they might actually be able to help you all the way is you ask nicely. And maybe they&#8217;ll tell you right away that the routers need to be configured before-hand instead of giggling frantically in a corner at your feeble attempts to troubleshoot your fresh little cluster.</p>
<p>Soooo… have fun!</p>
<p>And remember; with great powers come great responsibility.</p>
<p>[Sheesh! This post got out of hand!]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2012/load-balanced-scom2012-sdk-services-for-network-illiterates-opsmgr-nlb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parameter Replacement in AlertName</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/parameter-replacement-in-alertname/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/parameter-replacement-in-alertname/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 20:04:48 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[MP Development]]></category>
		<category><![CDATA[OpsMgr]]></category>

		<guid isPermaLink="false">http://www.teknoglot.se/?p=586</guid>
		<description><![CDATA[&#8230;and why you should not use it.]]></description>
			<content:encoded><![CDATA[<h3>&#8230;and why you should not use it.</h3>
<h4>A Disclimer</h4>
<h2>A Disclaimer</h2>
<p>I have had serious doubts about actually writing this article for almost a year now for reasons that I will explain further on. But as others have discovered this &#8220;feature&#8221; as well&#8211;maybe &#8220;hack&#8221; would be a better name for it&#8211;I feel the need to explain how it works and also why you should not use it. Knowledge is power, and even if I advice against using this technique it is also a good way to understand how SCOM uses display-strings in management packs.</p>
<p><br />
<h4>The Good News</h4></p>
<p><span id="more-586"></span></p>
<h2>The Good News</h2>
<p>Yes, you can use parameter replacement in you AlertName.</p>
<p>With &#8220;parameter replacement&#8221; i mean using some kind of substitute text, or mnemonic if you like, that at run-time get translated into something useful. If you have written any kind of alert generating rules or monitors, you most like included something like <em>$Data/Context/Property[@Name='SomeDataFromAPropertyBag']$</em> into your alert description.</p>
<p>In this dialog, you also have the possibility to set the Alert Name. And if you are lazy, like I am, you probably also noticed that it is impossible to insert any kind of dynamic data into that field as well. This is especially annoying when you are writing a management pack that needs to look different in the Alert Views in the console, and you want to monitor 50 different Events or Performance counters or Log entries that are pretty much the same apart from a Name or ID.<br />
Of course I could not refrain from copy-pasting a <em>$Data/Context&#8230;$</em> into the alert name only to realize that it simply is not being parsed and translated into the value of the specified parameter. Over time I have settled for a stand-point that it&#8217;s probably a performance issue and I have also used that as an argument for this apparent lack of simplicity that some of my customers have been questioning.</p>
<p>Two, maybe three, years later. Microsoft releases an update to the core agent monitoring packs. Much to my surprise, one performance monitor suddenly generated alerts with a dynamic performance value in the Alert Name. You know, that field that is not gettingt parsed I was mentioning in the earlier paragraph. It actually looked pretty bad and made it very much impossible to practice any kind of alert supression, but still. It actually had a parsed value in the Alert Name.<br />
As the lack of this feature had me irked before, I exported the core MP and started reading through the XML to find out how they did it. To my surprise, it was actually pretty simple if you ditched the Authoring Console and used your trusty text-editor instead.</p>
<p><br />
<h4>How To Do It</h4></p>
<h2>How To Do It</h2>
<p>In simple terms, if you know your SCOM XML out-side-in, you add the parameters to your &#8220;Alert&#8221; and modify your DisplayString, the one under LanguagePacks, to call that parameter by it&#8217;s relative ID.</p>
<p>Just in case you happen to be a regular mortal, here&#8217;s the step-by-step guide. <img src='http://www.teknoglot.se/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>In this example I have created a silly-simple Alert Generating EventLog rule in wich I have added some parameters to the description. It pretty much looks like this:<br />
<img src="http://www.teknoglot.se/wp/wp-content/uploads/2012/04/ParamReplacement_AlertDescriptionDialog.png" alt="Alert Description Dialog" /><br />
Saving the MP at this point I will have a new WriteAlert action with a bunch of parameters and a displaystring with a unique ID.<br />
The resulting XML-code for the WriteAlert action looks like this:</p>
<pre class="brush: xml; highlight: [7,8,9,10,11,12,13]; title: ; notranslate">
&lt;WriteAction ID=&quot;Alert&quot; TypeID=&quot;Health!System.Health.GenerateAlert&quot;&gt;
  &lt;Priority&gt;1&lt;/Priority&gt;
  &lt;Severity&gt;2&lt;/Severity&gt;
  &lt;AlertName /&gt;
  &lt;AlertDescription /&gt;
  &lt;AlertOwner /&gt;
  &lt;AlertMessageId&gt;$MPElement[Name=&quot;TestMP.MyEventlogAlertRule.AlertMessage&quot;]$&lt;/AlertMessageId&gt;
  &lt;AlertParameters&gt;
    &lt;AlertParameter1&gt;$Data/EventDescription$&lt;/AlertParameter1&gt;
    &lt;AlertParameter2&gt;$Data/LoggingComputer$&lt;/AlertParameter2&gt;
    &lt;AlertParameter3&gt;$Data/UserName$&lt;/AlertParameter3&gt;
    &lt;AlertParameter4&gt;$Data/EventNumber$&lt;/AlertParameter4&gt;
  &lt;/AlertParameters&gt;
  &lt;Suppression /&gt;
  &lt;Custom1 /&gt;
  &lt;Custom2 /&gt;
  &lt;Custom3 /&gt;
  &lt;Custom4 /&gt;
  &lt;Custom5 /&gt;
  &lt;Custom6 /&gt;
  &lt;Custom7 /&gt;
  &lt;Custom8 /&gt;
  &lt;Custom9 /&gt;
  &lt;Custom10 /&gt;
&lt;/WriteAction&gt;
</pre>
<p>In this slab of code, you&#8217;ve got the Parameters, their &#8220;relative ID&#8221; (the number in the Tag), and also the which is what you would need to search for among the displaystrings. Take note of the you want to use in your AlertName since you are going to need it later. A quick search for &#8220;TestMP.MyEventlogAlertRule.AlertMessage&#8221; will lead you to the actual message, which should looke similar to this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;DisplayString ElementID=&quot;TestMP.MyEventlogAlertRule.AlertMessage&quot;&gt;
  &lt;Name&gt;I want Parameter Replacement here:&lt;/Name&gt;
  &lt;Description&gt;Event Description: {0}
{1}
{2}
{3}
  &lt;/Description&gt;
&lt;/DisplayString&gt;
</pre>
<p>You should have one of these for every language you have configured in your management pack.<br />
As you may notice, the Description does not contain any XPaths of any kind but rather references to the parameters defined in the WriteAction. That would be the {X} thingies within the description tags. You may also notice that the AlertParameters starts from &#8220;1&#8243; while the parameter references begin with &#8220;0&#8243;. In practice, that means that <em>{0}</em> in the displaystring definition equals to <em>AlertParameter1</em> <em></em>and so forth.</p>
<p>Now, with this in mind, adding a Parameter to AlertName if very simple and straight-forward. Simply decide which parameter your want to use and add it&#8217;s reference to the Name definition.<br />
So, let&#8217;s say I have the above alert message and I want to include <em>UserName</em> in the Alert Name, I would change the &lt;Name&gt; tag to:</p>
<pre class="brush: xml; title: ; notranslate">&lt;Name&gt;I want Parameter Replacement here:{2}&lt;/Name&gt;</pre>
<p>That&#8217;s it folks!<br />
Save the XML, make sure you verify it and import it into your Operations Manager LAB and watch the magic. Just make sure you continue reading this post as the next part about the downsides is pretty important.</p>
<p><br />
<h4>What's the Downside?</h4></p>
<h2>What&#8217;s the Downside?</h2>
<p>The negative effects of using Parameter Replacement in AlertName really boils down to two main perspectives. These are, if I may say to, pretty major and is the reason I have been reluctant on posting this, sort of, how-to.</p>
<h3>You are breaking your subscriptions and connectors!</h3>
<p>Apparently, parameter replacement is not working in subscriptions and connectors, be it 3:rd-party, Universal, Orchestrator IPs et.c. Basically anything other than the Operations Console will not be able to handle your parameters in AlertName. This will give you a <em>&#8220;{1} in {2} has received an error&#8221;</em> instead of <em>&#8220;veryimportant.log in C:\Logs\ImportantSystem\ has received an error&#8221;</em> in anything except the Operations Console. Now, this might not be a bad thing if the Operations Console is your only interface to Operations Manager, but if you would like to forward these alerts to a mobile phone, IM user or a mail recipient it will be utterly useless. I have not verified this, but I am not sure if Alert Suppression is actually parsing the parameters as well. Also. If you, by means of connectors or System Center Orchestrator, are generating incidents from alerts the AlertName forwarded will be equally useless for anyone receiving it.</p>
<h3>It&#8217;s killing your health perspective.</h3>
<p>Might sound drastic, but I&#8217;m quite serious about this. Using Parameter Replacement in AlertName might be useful for alert generating rules, but should never be used in a monitor. The reason is pretty simple actually. If you are using a monitor, you are without a doubt interested in it&#8217;s state. Otherwise, you would not use a monitor, am I right? I cannot see how it would make sense to create a monitor that does not reflect the health of a specific checkpoint. Much less having a monitor generating alerts that might confuse any service desk operator about what monitor that caused the alert. Also&#8211;I have not tested this&#8211;I assume that a monitor would not update it&#8217;s AlertName once the alert are generated making it more difficult to troubleshoot. Alert generating rules are, to me, something I tend to use only when all other options fail for some reason and I do not like to monitor things to cannot have health. And since parameters in AlertName is nothing for monitors I also question whether it actually is usable at all.<br />
<br />
<h4>Conclusion</h4></p>
<h2>The Conclusion</h2>
<p>While this is an interesting techique and a good way to enjoy MP Authoring and learn about the behaviour of display strings and languages in you Management Packs, I would definitely consider it a mostly academical exercise. Only in <span style="text-decoration: underline;">extreme</span> use-cases and situations would I consider it a viably option and while it might look good in the console, do be aware of the limitations. I have also not seen anything about it on MSDN, and I have serious doubts about it being a supported feature. I have personally been using it in transition to a &#8220;better&#8221; management pack to get alerting running quickly, yet a prefered solution would actually be using a custom datasouce and a decent macro-enabled text-editor&#8211;not to mention snippets&#8211;to bulk-generate your monitors and/or rules.</p>
<blockquote><p>MP Authoring<br />
is fun and powerful<br />
&#8211; be resposible</p></blockquote>
<p><br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/parameter-replacement-in-alertname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bulk disable ACS Forwarders (with wildcards)</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/bulk-disable-acs-forwarders-with-wildcards/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/bulk-disable-acs-forwarders-with-wildcards/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 09:59:24 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[ACS]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://www.teknoglot.se/?p=558</guid>
		<description><![CDATA[Here&#8217;s a little something-something for the wicked. Me and my apprentice is currently decommissioning an entire Management Group with a thousand (-ish) agents. Long story short, we got a new Management Group, migrated all the agents, added a couple of hundreds more, deployed a bunch of gateways and now we are shutting down the old [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little something-something for the wicked.</p>
<p>Me and my apprentice is currently decommissioning an entire Management Group with a thousand (-ish) agents. Long story short, we got a new Management Group, migrated all the agents, added a couple of hundreds more, deployed a bunch of gateways and now we are shutting down the old one.</p>
<p>Now, uninstalling the old Management Group from all the agents is a breeze using SCCM and handling the few 20-ish servers that are left is not a biggie either. Shutting down ACS, however, is a different matter.</p>
<p>Although you do configure your forwarders using Operations Manager, removing the management group you were running ACS in does not mean the agents will shut down and disable the AdtAgent service or stop trying to forward audit events to your collector. Now, selecting 10 agents at the time and running the &#8220;Disable Audit Collection&#8221; task&#8211;in case you did not know, there&#8217;s a limitation on how many agents you can run a task on in the Operations Console&#8211;is not my idea of a jolly good day and since Powershell is a bucket of joy in comparison; here&#8217;s a script for you all!</p>
<p><a href="http://www.teknoglot.se/wp/wp-content/uploads/2011/07/DisableACSForwarders.zip">DisableACSForwarders</a></p>
<p>It is zipped to avoid security alerts, but as with any script found on the internet I implore to to read the code before actually running it.</p>
<p>Anyway, you can use it in a couple of ways.</p>
<p>To run it interactively, just go to the directory where you unpacked it and run it. You will be requested to enter the FQDN of you Root Management Server and a wildcard search for ACS Forwarders.<br />
For example:</p>
<pre class="brush: plain; title: ; notranslate">PS C:\..\Scripts&gt; .\DisableACSForwarders.ps1
Root Management Server: rms.teknoglot.local
ACS Forwarder name (wildcard): *.teknoglot.local</pre>
<p>You can also run it with parameters (for scheduling?) like this:</p>
<pre class="brush: plain; title: ; notranslate">PS C:\..\Scripts&gt; .\DisableACSForwarders.ps1 rms.teknoglot.local *.teknoglot.local</pre>
<p>If you need to run the task with different credentials there&#8217;s a switch for that. Just add -UseCredentials to the command and you will be prompted for it.<br />
Like this:</p>
<pre class="brush: plain; title: ; notranslate">PS C:\..\Scripts&gt; .\DisableACSForwarders.ps1 -UseCredentials</pre>
<p>As you might already have realized, the wildcard search does not require actual wildcards. If you only want to disable the ACS forwarder on a single machine, just enter it&#8217;s FQDN. As for what wildcards it will accept; <a title="Supporting Wildcard Characters in Cmdlet Parameters" href="http://msdn.microsoft.com/en-us/library/aa717088%28VS.85%29.aspx" target="_blank">anything supported by the powershell -like operator</a> is valid.</p>
<p>[UPDATE!] You might get false failures when running the script on clustered machines because of a <a title="Bug with Microsoft Audit Collection Services Management Pack" href="https://connect.microsoft.com/OpsMgr/feedback/details/523453/bug-with-microsoft-audit-collection-services-management-pack" target="_blank">bug in the AC Management Pack</a></p>
<div id="imcontent"></div>
<p>&nbsp;</p>
<div id="imcontent"></div>
<p>For the source code, read on!</p>
<p><span id="more-558"></span></p>
<pre class="brush: powershell; title: ; notranslate">
## Using parameters for RMS and wildcard search
param(
 [string]$rootManagementServer = $(Read-Host -Prompt &quot;Root Management Server&quot;),
 [string]$filterAgents = $(Read-Host -Prompt &quot;ACS Forwarder name (wildcard)&quot;),
 [switch]$UseCredentials
)

## Make sure the $rootManagementServer variable is defined
while (-not $rootManagementServer) {
 Write-Host &quot;`nRoot Management Server MUST be defined!&quot; -ForegroundColor Red
 [string]$rootManagementServer = $(Read-Host -Prompt &quot;Root Management Server&quot;)
}

if ($UseCredentials -eq $true) {
 $taskCredentials = Get-Credential
}

$startLocation = Get-Location
$checkPSSnapin = Get-PSSnapin | where {$_.Name -eq &quot;Microsoft.EnterpriseManagement.OperationsManager.Client&quot;}
if ($checkPSSnapin -eq $null) {
 Add-PSSnapin &quot;Microsoft.EnterpriseManagement.OperationsManager.Client&quot;
}
$result = Set-Location &quot;OperationsManagerMonitoring::&quot;
$result = New-ManagementGroupConnection -ConnectionString:$rootManagementServer
$result = Set-Location $rootManagementServer

$acsForwarderClass = Get-MonitoringClass -Name &quot;Microsoft.SystemCenter.ACS.Forwarder&quot;
$agentNames = Get-MonitoringObject -monitoringclass:$acsForwarderClass | where {$_.Path -like $filterAgents} | Select Path
$successfulTasks = @()
$skippedTasks = @()
$failedTasks = @()

$monitoringClass = Get-MonitoringClass -Name &quot;Microsoft.SystemCenter.Agent&quot;
if ($agentNames -ne $null) {
 Write-Host &quot;`nFound&quot;$agentNames.Count&quot;ACS forwarders with wildcard $filterAgents&quot;
 Write-Host &quot;`n`nWaiting for 5 seconds to give you a chance to abort!`n&quot;
 Start-Sleep -Seconds 5
 Write-Host &quot;Time's UP!`n`n&quot;
 $agentNames | ForEach-Object {
 $agentName = $_.Path
 Write-Host &quot;Disabling Audit Collection on&quot; $agentName
 $monitoringObject = Get-MonitoringObject -monitoringclass:$monitoringClass | where {$_.DisplayName -like $agentName}
 $agentTask = $monitoringObject | Get-Task | where {$_.Name -eq &quot;Microsoft.SystemCenter.DisableAuditCollectionService&quot;}
 if ($monitoringObject.IsAvailable -eq $true) {
 if ($credentials -eq $null) {
 $result = Start-Task -Task $agentTask -TargetMonitoringObject $monitoringObject
 } else {
 $result = Start-Task -Task $agentTask -TargetMonitoringObject $monitoringObject -Credential $taskCredentials
 }
 if ($result.Status -eq &quot;Succeeded&quot;) {
 Write-Host &quot;Operation Successful!&quot; -ForegroundColor Green
 Write-Host `n
 $successfulTasks += $agentName
 } else {
 Write-Host &quot;Operation failed.&quot; -ForegroundColor Red
 Write-Host $result.ErrorMessage
 Write-Host `n
 $failedTasks += $agentName
 }
 } else {
 Write-Host &quot;The agent is unavailable, Skipping!&quot;
 Write-Host `n
 $skippedTasks += $agentName
 }
 }
 Write-Host &quot;Summary&quot;
 Write-Host &quot;`tSuccessful:`t&quot;$successfulTasks.count
 Write-Host &quot;`tFailed:`t`t&quot;$failedTasks.count
 Write-Host &quot;`tSkipped:`t&quot;$skippedTasks.count
} else {
 Write-Host &quot;`nNo ACS Forwarders found using wildcard $filterAgents&quot;
}

Set-Location $startLocation
</pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/bulk-disable-acs-forwarders-with-wildcards/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpsMgr 2007 Connectivity Map</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/opsmgr-2007-connectivity-map/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/opsmgr-2007-connectivity-map/#comments</comments>
		<pubDate>Tue, 17 May 2011 10:47:18 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Quick Reference]]></category>

		<guid isPermaLink="false">http://www.teknoglot.se/?p=505</guid>
		<description><![CDATA[  I&#8217;ve had this little visio drawing lying around on my desktop for a while now and I thought that it might be a nice thing to share. It is nothing ground breaking at all and all the information is available at the Operations Manager 2007 R2 Supported Configurations page on Technet, but I find the [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<p><a href="http://www.teknoglot.se/wp/wp-content/uploads/2011/05/SCOM_Connectivity_Map.png" rel="lightbox[505]"><img class="alignleft size-medium wp-image-521" title="SCOM Connectivity Map" src="http://www.teknoglot.se/wp/wp-content/uploads/2011/05/SCOM_Connectivity_Map-300x279.png" alt="SCOM Connectivity Map" width="300" height="279" /></a>I&#8217;ve had this little visio drawing lying around on my desktop for a while now and I thought that it might be a nice thing to share.</p>
<p>It is nothing ground breaking at all and all the information is available at the <a title="Operations Manager 2007 R2 Supported Configurations" href="http://technet.microsoft.com/en-us/library/bb309428.aspx">Operations Manager 2007 R2 Supported Configurations</a> page on Technet, but I find the visual map easier to read and I use it personally to quickly look up all port openings for the most common components in Operations Manager.</p>
<p>It is missing a few components like ACS, AEM and XPlat, but I usually just look them up when needed.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/opsmgr-2007-connectivity-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to TG WinAutoSvc v1</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/introduction-to-tg-winautosvc-v1/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/introduction-to-tg-winautosvc-v1/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 10:35:47 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[MP Development]]></category>
		<category><![CDATA[OpsMgr]]></category>

		<guid isPermaLink="false">http://www.teknoglot.se/?p=489</guid>
		<description><![CDATA[Background For quite some time now I&#8217;ve had this idea spinning around in my head to write a couple of blog-posts about some of the more useful techniques available when building management packs. Many of these techniques are already described on MSDN and Technet- or other blogs as well as on various forums, but often [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>For quite some time now I&#8217;ve had this idea spinning around in my head to write a couple of blog-posts about some of the more useful techniques available when building management packs. Many of these techniques are already described on MSDN and Technet- or other blogs as well as on various forums, but often no more than small bits and pieces of them and I have yet to see some humanly readable information about how to tie them together into a useful management pack. I say &#8220;humanly readable&#8221; because the information you do find online so far may be clear and somewhat easy to understand for someone with a system development background and a pretty good idea of how object oriented development models tend to work. But the real life System Center Operations Manager engineer&#8211;you know the one who get those <em>&#8220;do you think we could monitor our &#8230;-system too?&#8221;</em> questions a couple of times a week, you know&#8230; you (most likely, being here)&#8211;tend to have a completely different background. Yet as their OpsMgr environment grows, so does the demand for custom monitoring and all of a sudden the former server engineer are now also a developer. A developer who has never before had the need to grasp such abstract concepts as classes, instances, inheritance and who probably never before have had any reason whatsoever to write any XML code.</p>
<h2>Purpose</h2>
<p>My idea for this series of posts is to shed some light into the world of the authoring console and modules and cookdown and so forth. I am by no means an accredited author, but I will do my best to stay human in this venture and in plain english try to explain why and how you do certain things when going from Management Pack templates, rules, monitors and the safe haven that is authoring in the Operations Console into making your scripts resuable, easy to extend and prime for cookdown using the Authoring Console and XML.</p>
<h2>The TG WinAutoSvc Management Pack</h2>
<p>To give the series some kind of context and at the same time not only be a matter of examples I will base them on a fully functional management pack that discovers and monitors all Windows services that are set to automatic startup. I know there is other similar management packs out there but I haven&#8217;t fancied any one of them yet, and since I had the idea of writing this series I decided that building a new one would be a good way to go. Some of the interesting features with this management pack is:</p>
<ul>
<li>You will get an instance of the service classes for each and every service.</li>
<li>It uses different classes for Own Process services and Shared Process services (svchost for example).</li>
<li>Every service have a health state (you can use them in distributed applications).</li>
<li>The service state monitors are inherited from their base classes, no coding neccesary.</li>
<li>There is only one discovery script for all kinds of windows services.</li>
<li>Extending the discovery to include different kinds of windows services, like kernel processes, is a matter of filtering.</li>
<li>It is Open Source and licensed under the <a title="Eclipse Public License v1" href="http://tg-winautosvc.googlecode.com/svn/trunk/LICENSE.TXT">Eclipse Public License v1</a>.</li>
</ul>
<p>Most of these features will be described thoroughly in later posts in the series and as development of it progresses I will document what I do, how I do it and why I do it in certain ways. Hopefully you will learn something new through this and get closer to becoming that MP Dev the organization asks for.<br />
In the mean time, feel free to download, look at the source code (which it by no means perfect) and try it out.</p>
<p>The TG WinAutoSvc monitoring management pack is available for download here:<br />
<a href="http://code.google.com/p/tg-winautosvc/downloads/detail?name=TG.WinAutoSvc.xml">http://code.google.com/p/tg-winautosvc/downloads/detail?name=TG.WinAutoSvc.xml</a></p>
<p>The latest revision of the source code is located here:<br />
<a href="http://code.google.com/p/tg-winautosvc/source/browse/trunk/TG.WinAutoSvc.xml">http://code.google.com/p/tg-winautosvc/source/browse/trunk/TG.WinAutoSvc.xml</a></p>
<p>A small word of advice though. If you implement this in your environment, remember that you probably have alot more automatic services than you would expect. Because of this, discovery is disabled by default.</p>
<p>Best of luck, and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/introduction-to-tg-winautosvc-v1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<series:name><![CDATA[MP Dev: TG WinAutoSvc]]></series:name>
	</item>
		<item>
		<title>SNMP GET Errors in OpsMgr EventLog</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/snmp-get-errors-in-eventlog/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/snmp-get-errors-in-eventlog/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 21:28:07 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[TroubleShooting]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/?p=306</guid>
		<description><![CDATA[I&#8217;ve been building a little SNMP Management Pack in the past few days to discover and monitor a bunch of PowerWare UPS&#8217;s, which turned out to take quite a lot more energy and time than expected. Mostly due to the facts that I am really bad with SNMP and how it works, I&#8217;ve never really [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been building a little SNMP Management Pack in the past few days to discover and monitor a bunch of PowerWare UPS&#8217;s, which turned out to take quite a lot more energy and time than expected. Mostly due to the facts that I am really bad with SNMP and how it works, I&#8217;ve never really looked into the inner working of building an SNMP management pack and also because we ran into a couple of errors preventing the discovery process to work alright.</p>
<p>To make it clear right away, this is not going to be a &#8220;Building an SNMP Management Pack Tutorial&#8221; since there&#8217;s plentiful good ones out there already, and to be extra helpful I&#8217;m gonna include a few links right away:</p>
<ul>
<li><a title="SNMP Setup and Simple Custom SNMP Discovery" href="http://www.systemcentercentral.com/BlogDetails/tabid/143/IndexID/66140/Default.aspx">SNMP Setup and Simple Custom SNMP Discovery</a> &#8211; Pretty much the basics</li>
<li><a title="SNMP Management Pack Example: NetApp Management Pack for SCOM 2007 R2 part 4" href="http://www.systemcentercentral.com/BlogDetails/tabid/143/IndexID/58919/Default.aspx">SNMP Management Pack Example: NetApp Management Pack</a> &#8211; Part 4 actually, but has the links to the other parts</li>
<li><a title="Creating SNMP Probe Based Monitors" href="http://www.systemcentercentral.com/Details/tabid/147/IndexID/58815/Default.aspx">Creating SNMP Probe Based Monitors</a> &#8211; No custom discovery, but a good and simple guide to SNMP Probes</li>
</ul>
<p>It&#8217;s the second, the NetApp one, I&#8217;ve used as a guide to building the UPS management pack since it goes through the process of building your own filtered discovery using SystemOID to identify your hardware-classes and then building the monitors on top of those.</p>
<h2>Let&#8217;s get to it</h2>
<p>When building the discovery of my hardware classes I ran into problems. The discovery simply did not work. At first I got some strange errors about &#8220;invalid queries&#8221;, something that turned out to be related to me reading two guides&#8211;seriously though, pick one guide that is closest to what you want to achieve and stick to it&#8211;and mixing up the XPathQuery variables. Silly me.<br />
I got those errors to go away and I was able to get a few objects to my base-class, but none of the hardware classes who was populated through the return value of an SNMP OID got discovered.<br />
The only error I got this time was the following:<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: small;"><span style="line-height: 18px; white-space: pre;"><br />
</span></span></p>
<pre class="brush: plain; title: ; notranslate">Log Name:      Operations Manager
Source:        Health Service Modules
Date:          2010-09-02 11:19:12
Event ID:      11001
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CENSORED
Description:
Error sending an SNMP GET message to IP Address XX.XX.XX.XX, Community String:=CENSORED, Status 0x6c.

One or more workflows were affected by this.

Workflow name: CENSORED.MP.CLASS.DISCOVERY
Instance name: CENSORED_DEVICENAME
Instance ID: {5C7EFB30-D885-8843-0DD7-EA86B4FD2311}
Management group: CENSORED
</pre>
<div>I went through all the other logical steps of troubleshooting an error like that which include double-checking firewall settings, OIDs, IP-addresses, allowed hosts and so forth. It wasn&#8217;t until I loaded the <a title="EATON Protocol Library" href="http://www.networkupstools.org/protocols/eaton/">PowerMIB</a> into a MIB Browser installed on the proxy machine (in this case a Management Server) I realized that there was no problem sending an SNMP GET to the UPS from that server. I launched Wireshark and had it listen to SNMP traffic between the UPS and the Management Server. The thing that struck me right-away was the fact that I could see the a bunch of &#8220;SNMP Get-Request&#8221; but no &#8220;SNMP Get-Response&#8221; which means that Operations Manager did send an SNMP GET but there was no response.</div>
<div>After a bit of intense staring i noticed what you see in the screenshot.</div>
<div></div>
<div><img class="alignnone size-full wp-image-307" title="SNMP Error in Wireshark" src="http://www.teknoglot.se/wp/wp-content/uploads/2010/09/snmp_error_wireshark.png" alt="SNMP Error in Wireshark" width="622" height="138" /></div>
<div>
</div>
<div>For some reason Operations Manager does not care about what SNMP version you configure when you do the initial discovery of a network device. Even if you do specify SNMP v1, you probes may very well be using SNMP v2c instead and in many cases that will result in these SNMP GET errors in the Operations Manager event log.</div>
<div>To avoid this, you haves to specify which SNMP version to use in your System.SnmpProbe according to the information provided here: <a href="http://msdn.microsoft.com/en-us/library/ee809331.aspx">http://msdn.microsoft.com/en-us/library/ee809331.aspx</a></div>
<div>Since I am such a nice guy, here&#8217;s an example of the working probe with the added line highlighted.</div>
<div>
<pre class="brush: xml; highlight: [4]; title: ; notranslate">
&lt;IsWriteAction&gt;false&lt;/IsWriteAction&gt;
&lt;IP&gt;$Config/IP$&lt;/IP&gt;
&lt;CommunityString&gt;$Config/CommunityString$&lt;/CommunityString&gt;
&lt;Version&gt;1&lt;/Version&gt;
&lt;SnmpVarBinds&gt;
	&lt;SnmpVarBind&gt;
		&lt;OID&gt;1.3.6.1.4.1.534.1.1.1.0&lt;/OID&gt;
		&lt;Syntax&gt;0&lt;/Syntax&gt;
		&lt;Value VariantType=&quot;8&quot;&gt;&lt;/Value&gt;
	&lt;/SnmpVarBind&gt;
	&lt;SnmpVarBind&gt;
		&lt;OID&gt;1.3.6.1.4.1.534.1.1.2.0&lt;/OID&gt;
		&lt;Syntax&gt;0&lt;/Syntax&gt;
		&lt;Value VariantType=&quot;8&quot;&gt;&lt;/Value&gt;
	&lt;/SnmpVarBind&gt;
	&lt;SnmpVarBind&gt;
		&lt;OID&gt;1.3.6.1.4.1.534.1.1.3.0&lt;/OID&gt;
		&lt;Syntax&gt;0&lt;/Syntax&gt;
		&lt;Value VariantType=&quot;8&quot;&gt;&lt;/Value&gt;
	&lt;/SnmpVarBind&gt;
&lt;/SnmpVarBinds&gt;
</pre>
<p>That&#8217;s it. Working perfectly now.</p>
<p>Best of luck to you too.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/snmp-get-errors-in-eventlog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8220;Load Balancing&#8221; Powershell Script for Operations Manager</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/loadbalancing-ps-script-opsmgr/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/loadbalancing-ps-script-opsmgr/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 13:27:37 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/?p=273</guid>
		<description><![CDATA[I&#8217;ve been looking for at way to evenly distribute agents between Gateway Servers (or Management Servers for that matter, but I&#8217;ll stick to GWs this time) for some time but haven&#8217;t really got to fixing it myself until now. The situation is basically that we&#8217;re monitoring customers through gateway servers connected to our central Operations Manager environment. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for at way to evenly distribute agents between Gateway Servers (or Management Servers for that matter, but I&#8217;ll stick to GWs this time) for some time but haven&#8217;t really got to fixing it myself until now.</p>
<p>The situation is basically that we&#8217;re monitoring customers through gateway servers connected to our central Operations Manager environment. To have a bit of redundancy we always put two (or more) gateway servers per site (or customer, really) and they, in turn, talks to a couple of central management servers. I guess a drawing would be nice, but I have no Visio on this computer. The gateways are manually configured to talk to different management servers and have the others configured for fail-over (through powershell) and since we&#8217;re talking about no more than a few handfuls (say 20-ish) it&#8217;s not a problem handling it that way.</p>
<p>Agents, on the other hand, are a different matter. Even though we try to spread them out somewhat evenly at deployment between the gateway servers at each site we still end up looking at a 3:2 ratio after a while and since agents do not automatically fail-over between gateway servers we need a way to fix that too.<br />
So I wrote a little powershell script that takes a bunch of gateway servers (or management servers) as parameters, gathers all connected agents, spreads the agents evenly between the servers and configures the others as fail-over servers while at it.</p>
<p>It&#8217;s all pretty crude, but it works and you can download it from here: <a rel="attachment wp-att-274" href="http://teknoglot.hartati.se/ms/opsmgr2007/loadbalancing-ps-script-opsmgr/attachment/distributeagents/">DistributeAgents.ps1</a><br />
Save it somewhere on disk and call it from the Operations Manager Shell like this:</p>
<pre class="brush: plain; title: ; notranslate">C:DistributeAgents.ps1 gateway01.customer.local,gateway02.customer.local,gateway03.customer.local</pre>
<p>Yes, you should replace &#8220;C:&#8221; with whatever path you decided to save the script to and &#8220;gatewayXX.customer.local&#8221; with a real servername. <img src='http://www.teknoglot.se/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Ok, I&#8217;m a powershell freshman and I&#8217;m pretty sure you could do this a prettier way, but here&#8217;s the script:</p>
<pre class="brush: powershell; title: ; notranslate">
Param([array]$CSVServerList)

$arrServerObject = @()
$arrAgentObject = @()

foreach($Server in $CSVServerList)
{
	$arrServerObject += Get-ManagementServer | where {$_.Name -eq $Server}
	echo &quot;Looking for $Server&quot;
}
$ServerCount = $arrServerObject.Count
if ($ServerCount -gt 1)
{
	echo &quot;Found $ServerCount management servers&quot;
} else {
	echo &quot;Found only 1 (or less) management servers. Aborting...&quot;
	Exit
}

echo &quot;Getting agents...&quot;
foreach ($Server in $arrServerObject)
{
	$arrAgentObject += Get-Agent | where {$_.PrimaryManagementServerName -eq $Server.Name}
}
$AgentCount = $arrAgentObject.Count
if ($AgentCount -gt 1)
{
	echo &quot;Found $AgentCount agents&quot;
	Start-Sleep -m 200
} else {
	echo &quot;Found only 1 (or less) agents. Aborting...&quot;
	Exit
}
$i = 0
foreach ($Agent in $arrAgentObject)
{
	if ($i -ge $ServerCount)
	{
		$i = 0
	}
	$arrTemp = @($arrServerObject | Where-Object {$_ -ne $arrServerObject[$i]})
	# $FailoverServers = $arrTemp -join &quot;,&quot;
	Set-ManagementServer -AgentManagedComputer: $Agent -PrimaryManagementServer: $arrServerObject[$i] -FailoverServer: $arrTemp

	$arrTemp = $null
	$i++
}
</pre>
<p>I have used it on a couple of occasions now and have only discovered a problem with an error when one of the servers don&#8217;t have any agents at all (probably a new one), but the script still works so I haven&#8217;t really dived into it.<br />
Now, as with all scripts you download on the &#8216;net it&#8217;s up to you to test it in a lab before shooting wildly among your in-production systems. I really can&#8217;t give any warranties that it won&#8217;t FSU royally at your place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/loadbalancing-ps-script-opsmgr/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Change Gateway Powershell Script</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/change-gateway-powershell-script/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/change-gateway-powershell-script/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 14:27:08 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/ms/opsmgr2007/change-gateway-powershell-script/</guid>
		<description><![CDATA[This script has pretty much already been covered in my previous post about Changing or Replacing an Operations Manager Gateway Server. This time I’ve basically put parameter support in it to make it easier to use. Here’s the script anyway. To use it, create a textfile called ChangeGW.ps1 and paste the code into it. Save [...]]]></description>
			<content:encoded><![CDATA[<p>This script has pretty much already been covered in my previous post about <a href="http://teknoglot.hartati.se/ms/opsmgr2007/replacechange-a-gateway-server/">Changing or Replacing an Operations Manager Gateway Server</a>.</p>
<p>This time I’ve basically put parameter support in it to make it easier to use.</p>
<p>Here’s the script anyway.</p>
<pre class="brush: powershell; title: ; notranslate">

Param($OldGW,$NewGW)

$OldMS= Get-ManagementServer | where {$_.Name -eq $OldGW}
$NewMS = Get-ManagementServer | where {$_.Name -eq $NewGW}
$agents = Get-Agent | where {$_.PrimaryManagementServerName -eq $OldGW}
$agents = $agents
&quot;Moving &quot; + $agents.count + &quot; agents from &quot; + $OldMS.Name + &quot; to &quot; + $NewMS.Name
Start-Sleep -m 200
Set-ManagementServer -AgentManagedComputer: $agents -PrimaryManagementServer: $NewMS -FailoverServer: $OldMS
</pre>
<p>To use it, create a textfile called ChangeGW.ps1 and paste the code into it. Save the file somewhere neat (maybe C:Scripts) for easy access. If you don&#8217;t feel like copy/pasting, you can <a href="http://teknoglot.hartati.se/ms/opsmgr2007/change-gateway-powershell-script/attachment/changegw/">download the script here</a>.</p>
<p>To use it, open the Operations Manager Command Shell and type:<br />
<strong>C:ScriptsChangeGW.ps1 &lt;old.gatewayserver.dns.name&gt; &lt;new.gatewayserver.dns.name&gt;</strong></p>
<p>For example:</p>
<pre class="brush: plain; title: ; notranslate">
C:ScriptsChangeGW.ps1 gwserver01.domainname.local gwserver02.domainname.local
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/change-gateway-powershell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ESENT Error When Modifying OpsMgr Agent</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/esent-error-when-modifying-opsmgr-agent/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/esent-error-when-modifying-opsmgr-agent/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 09:34:17 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Installer]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/ms/opsmgr2007/esent-error-when-modifying-opsmgr-agent/</guid>
		<description><![CDATA[Getting “ESENT Kerys are required to install this application” when you are trying to modify/change an agent installation? This seems to be  most common on Windows 2008 and i guess it’s because of the UAC and the fact that opening the Control Panel isn’t running in administrative mode. To work around this you need to [...]]]></description>
			<content:encoded><![CDATA[<p>Getting “ESENT Kerys are required to install this application” when you are trying to modify/change an agent installation?</p>
<p><a href="http://www.teknoglot.se/wp/wp-content/uploads/2010/03/image.png" rel="lightbox[260]"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="image" src="http://www.teknoglot.se/wp/wp-content/uploads/2010/03/image_thumb.png" border="0" alt="image" width="368" height="172" /></a></p>
<p>This seems to be  most common on Windows 2008 and i guess it’s because of the UAC and the fact that opening the Control Panel isn’t running in administrative mode.</p>
<p>To work around this you need to run the msiexec command on the correct installation GUID from an administrative command prompt.</p>
<p>Besides running through the registry to find the GUID, one of the easier ways is this:</p>
<ol>
<li>Open an administrative command prompt.</li>
<li>run <strong>wmic product</strong></li>
<li>Locate your product by its name, the GUID (looks a bit like this {25097770-2B1F-49F6-AB9D-1C708B96262A}) directly after that is the one you want. Copy it.</li>
<li>run <strong>msiexec /i &lt;PASTEYOURGUIDHERE&gt;</strong></li>
<li>Modify the agent as pleased</li>
</ol>
<p>That’s pretty much it. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/esent-error-when-modifying-opsmgr-agent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated MSMQ Management Pack v6.0.6615.0!</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/updated-msmq-management-pack/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/updated-msmq-management-pack/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 08:57:38 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[OpsMgr]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/ms/opsmgr2007/updated-msmq-management-pack/</guid>
		<description><![CDATA[Microsoft has released an update to the MSMQ (version 3) management pack. System Center Pack for: Message Queuing 3.0 Version: 6.0.6615.0 Released on: 12/14/2009 Message Queuing (also known as MSMQ) is a server application that enables applications to communicate across heterogeneous networks and systems that may be temporarily offline or otherwise inaccessible. Instead of an [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has released an update to the MSMQ (version 3) management pack.</p>
<blockquote><p>System Center Pack for: Message Queuing 3.0      <br />Version: 6.0.6615.0       <br />Released on: 12/14/2009</p>
<p>Message Queuing (also known as MSMQ) is a server application that enables applications to communicate across heterogeneous networks and systems that may be temporarily offline or otherwise inaccessible. Instead of an application communicating with a service on another computer, it sends its information to Message Queuing, which sends the information to a Message Queuing service on the target computer where it is made available to the other application. Message Queuing provides guaranteed delivery, efficient routing, security, and priority based messaging.</p>
</blockquote>
<p>Now, what’s really interesting is what you will find in the MP Guide under “Supported Configurations”.</p>
<blockquote><p>The Message Queuing Management Pack for Operations Manager 2007 is designed to monitor Message Queuing version 3 only.</p>
<p>The Message Queuing Management Pack supports the following platforms:</p>
<p>· Windows Server 2003</p>
<p>· Windows XP</p>
<p><font color="#800000">The Message Queuing Management Pack also supports monitoring clustered MSMQ components</font>.</p>
</blockquote>
<p>Text coloration is obviously added by me to highlight the interesting part. <img src='http://www.teknoglot.se/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Finally MSMQ monitoring seems to be cluster aware, which might mean that the home-made pack i did to have those (numerous) queues covered could be passed on to the scrap-heap. This is also confirmed under “Changes in This Update”.</p>
<blockquote><p>The December 2009 update to this management pack includes the following change:</p>
<p>· Fixed a problem when working with an instance of MSMQ in a Cluster. The MP is now able to discover and monitor public and private queues in a cluster.</p>
<p>· Fixed a problem when discovering the local and cluster instance of MSMQ. The MP is now able to discover and monitor both instances.</p>
</blockquote>
<p>The confusing double RunAs profiles seems to have been cleaned up too (you only have to worry about one now) as well as fixing some sloppy mistakes in the previous scripts (no Option Explicit? C’mon Microsoft! You <em>write</em> the best practices, try to stick to them.) and generally improving display and documentation.</p>
<p>Gonna import this to our staging environment today and let it roll during the holidays.</p>
<p>Cheers! Oh, and happy holidays!</p>
<blockquote><p>Download and documentation:      <br /><a title="http://www.microsoft.com/downloads/details.aspx?FamilyId=1D2B4398-8BC2-4A43-850C-852EBB0D983B&amp;displaylang=en&amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=1D2B4398-8BC2-4A43-850C-852EBB0D983B&amp;displaylang=en&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=1D2B4398-8BC2-4A43-850C-852EBB0D983B&amp;displaylang=en&amp;displaylang=en</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/updated-msmq-management-pack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Discovery – Not Enough Entropy</title>
		<link>http://www.teknoglot.se/linux/sles/linux-discovery-not-enough-entropy/</link>
		<comments>http://www.teknoglot.se/linux/sles/linux-discovery-not-enough-entropy/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 11:37:08 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[SLES]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[TroubleShooting]]></category>
		<category><![CDATA[X-Plat]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/?p=243</guid>
		<description><![CDATA[Here’s a little trouble-shooting guide for discovering Linux systems from OpsMgr R2 when getting the following error from the wizard: But first, a little background on the actual “problem”. To generate the certificate, the entropy needs to be high enough to generate random data for the certificate creation. Without the certificate, the OpsMgr agent won’t [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s a little trouble-shooting guide for discovering Linux systems from OpsMgr R2 when getting the following error from the wizard:</p>
<pre class="brush: xml; title: ; notranslate">&lt;stdout&gt;Generating certificate with hostname=&quot;COMPUTERNAME&quot;

[/home/serviceb/TfsCoreWrkSpcRedhat/source/code/tools/scx_ssl_config/scxsslcert.cpp:198]

Failed to allocate resource of type random data: Failed to get random data - not enough entropy

&lt;/stdout&gt;&lt;stderr&gt;error: %post(scx-1.0.4-248.i386) scriptlet failed, exit status 1

&lt;/stderr&gt;&lt;returnCode&gt;1&lt;/returnCode&gt;

&lt;DataItem type=&quot;Microsoft.SSH.SSHCommandData&quot; time=&quot;2009-08-05T11:15:01.5800358-04:00&quot; sourceHealthServiceId=&quot;0EB1D6DA-202C-7FC5-3D46-BDBB9208547D&quot;&gt;&lt;SSHCommandData&gt;&lt;stdout&gt;Generating certificate with hostname=&quot;COMPUTERNAME&quot;

[/home/serviceb/TfsCoreWrkSpcRedhat/source/code/tools/scx_ssl_config/scxsslcert.cpp:198]

Failed to allocate resource of type random data: Failed to get random data - not enough entropy

&lt;/stdout&gt;&lt;stderr&gt;error: %post(scx-1.0.4-248.i386) scriptlet failed, exit status 1

&lt;/stderr&gt;&lt;returnCode&gt;1&lt;/returnCode&gt;&lt;/SSHCommandData&gt;&lt;/DataItem&gt;
</pre>
<p>But first, a little background on the actual “problem”. To generate the certificate, the <em>entropy</em> needs to be high enough to generate random data for the certificate creation. Without the certificate, the OpsMgr agent won’t be able to open up communications with the <acronym title="Management Server">MS</acronym>. So, what creates this entropy we need? Bluntly put, a selection of hardware components that are likely to produce non-predictable data. Like a keyboard, mouse and a monitor or videocard. Of course, there’s a lot more to it, but we really don’t need to know this. What <em>we</em> need to know is that there has to be a “bit bucket” of more than 256bytes of entropy for the certificate creation process to succeed. We also need to know that more enterprise-ish servers, like rack- or blade-servers tend to be void of things like directly attached keyboards, mouses and monitors that the linux kernel needs to be able to generate entropy. And herein lies the problem. If you have a new server that is not in full service (likely since we are trying to deploy the monitoring on it) which means that there’s not much random data flowing through the hardware and there’s no keyboard or mouse or monitor connected to it there is quite the risk that the system entropy is going to be very low. Of the linux systems that I have been deploying OpsMgr agents to, about half have failed because of “Not enough entropy”. So, here’s the steps I usually takes to ensure that discovery works. I use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY</a> to connect to the soon-to-be-monitored servers. This guide also assumes that you have SU rights on the system since all of these steps (except #1) needs it.</p>
<ol>
<li>Check you current entropy
<pre class="brush: plain; title: ; notranslate">cat /proc/sys/kernel/random/entropy_avail</pre>
<p>Is it less than, or close to, 256? It probably is. If you don’t feel like connecting a mouse and start wiggling it around—not really feasible in a data center—and see if the entropy increases, you can generate your own random data.</li>
<li>Generate you own random data.<br />
Be advised that this forced entropy will not be as random as the system-created on and thus not as secure. How much more insecure it is, I don’t know, and quite frankly I prefer to have my systems monitored yet slightly less secure than not monitored at all. Anyway, you can force your own random data by running:</p>
<pre class="brush: plain; title: ; notranslate">dd if=/dev/urandom of=~/.rnd bs=1 count=1024</pre>
<p>This creates a .rnd file with 1024B of random data that the certificate creation process will use instead of the system entropy if the file exists.</li>
<li>Uninstall and re-discover<br />
The first failed attempt of discovery will most likely leave a non-working agent installation that we have to remove. Otherwise we will just be stuck with an “Access Denied” error. Run:</p>
<pre class="brush: plain; title: ; notranslate">rpm –e scx</pre>
<p>Now, try to discover the system again.</li>
<li>Failed again?<br />
Try generating the certificate manually by running:</p>
<pre class="brush: plain; title: ; notranslate">/opt/microsoft/scx/bin/tools/scxsslconfig -f –v
/opt/microsoft/scx/bin/tools/scxadmin –restart</pre>
<p>Retry discovery again.</li>
<li>Still fails?<br />
Uninstall the agent once more as instructed in step 3.</li>
</ol>
<p>Stese steps have solved my problems 100% on both SUSE and RedHat and hopefully they will help you too.</p>
<p>Interestingely enough, these problems seems to be connected to some changes in the 2.6 kernel and basically everything that uses SSL-ish certificates will be affected. Even though the symptoms may be a bit more subtle, like time-outs and disconnects. For “headless” servers like those I usually to administer where the random data tend to be much lower, there’s even specialised hardware whose sole purpose is to generate random data, like the <a href="http://www.entropykey.co.uk/">Entropy Key</a>. I have also been told that new servers is likely to be equipped with entropy chipsets to make sure that there’s chaos enough to avoid these new-found oddities.</p>
<blockquote><p>Sources:<br />
<a title="http://social.technet.microsoft.com/Forums/en-US/crossplatformsles/thread/f94ec905-23ac-4444-b9f8-644fec3ae357" href="http://social.technet.microsoft.com/Forums/en-US/crossplatformsles/thread/f94ec905-23ac-4444-b9f8-644fec3ae357">http://social.technet.microsoft.com/Forums/en-US/crossplatformsles/thread/f94ec905-23ac-4444-b9f8-644fec3ae357</a></p>
<p><a title="http://www.askrenzo.com/oracle/SCOM/SCOM_discovering_nodes.html" href="http://www.askrenzo.com/oracle/SCOM/SCOM_discovering_nodes.html">http://www.askrenzo.com/oracle/SCOM/SCOM_discovering_nodes.html<br />
</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/linux/sles/linux-discovery-not-enough-entropy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Updated: MP for System Center Configurations Manager 2007 SP2 on x64</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/updated-mp-for-system-center-configurations-manager-2007-sp2-on-x64/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/updated-mp-for-system-center-configurations-manager-2007-sp2-on-x64/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 11:13:00 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/ms/opsmgr2007/updated-mp-for-system-center-configurations-manager-2007-sp2-on-x64/</guid>
		<description><![CDATA[Microsoft has released an updated MP for SCCM SP2 (v6.0.6000.2, released on 10/28/2009) for OpsMgr R2. The update basically contains support for x64 that was missing in the previous release. The Configuration Manager 2007 SP2 Management Pack adds support for monitoring Configuration Manager 2007 SP2 in a 64-bit environment with Operations Manager 2007 R2 or [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has released an updated <acronym title="Management Pack">MP</acronym> for <acronym title="System Center Configurations Manager">SCCM </acronym>SP2 (v6.0.6000.2, released on 10/28/2009) for OpsMgr R2.</p>
<p>The update basically contains support for x64 that was missing in the previous release.</p>
<blockquote><p>The Configuration Manager 2007 SP2 Management Pack adds support for monitoring Configuration Manager 2007 SP2 in a 64-bit environment with Operations Manager 2007 R2 or Operations Manager 2007 SP1 with hotfix (KB971541) installed. This enables the Configuration Manager 2007 SP2 Management Pack to work with either the 32-bit or the 64-bit Operations Manager 2007 agent. <span style="color: #800000;">Except for the 64-bit support, the other features and guidance for Configuration Manager 2007 Management Packs remain intact</span>.</p></blockquote>
<p><span style="font-size: xx-small;">(coloration added by me)</span></p>
<p>Read more and download here:<br />
<a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=a8443173-46c2-4581-b3b8-ce67160f627b" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a8443173-46c2-4581-b3b8-ce67160f627b">http://www.microsoft.com/downloads/details.aspx?FamilyID=a8443173-46c2-4581-b3b8-ce67160f627b</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/updated-mp-for-system-center-configurations-manager-2007-sp2-on-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Adds support for SUSE 11 in OpsMgr R2</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/microsoft-adds-support-for-suse-11-in-opsmgr-r2/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/microsoft-adds-support-for-suse-11-in-opsmgr-r2/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 06:59:10 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[SUSE 11]]></category>
		<category><![CDATA[X-Plat]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/ms/opsmgr2007/microsoft-adds-support-for-suse-11-in-opsmgr-r2/</guid>
		<description><![CDATA[This update hasn’t showed up in the MP Catalog yet, but the System Center Operations Manager 2007 R2 Cross Platform Update can be downloaded here. Besides SUSE 11 support, here’s the short overview. The System Center Operations Manager 2007 R2 Cross Platform Update adds fixes for a defunct process issue on Unix/Linux Servers, as well [...]]]></description>
			<content:encoded><![CDATA[<p>This update hasn’t showed up in the <acronym title="Management Pack">MP</acronym> Catalog yet, but the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4a41a8be-0a37-4bd2-b5b1-026468b317fb">System Center Operations Manager 2007 R2 Cross Platform Update can be downloaded here</a>.</p>
<p>Besides SUSE 11 support, here’s the short overview.</p>
<blockquote><p>The System Center Operations Manager 2007 R2 Cross Platform Update adds fixes for a defunct process issue on Unix/Linux Servers, as well as, adds support for SUSE Linux Enterprise Server 11 (both 32-bit and 64-bit versions) and Solaris Zone support.      <br /><b>Feature Summary:</b>       <br />The System Center Operations Manager 2007 R2 Cross Platform Update supports the monitoring of Unix/Linux Servers including: </p>
<ul>
<li>Monitoring of SUSE Linux Enterprise Server 11 servers (both 32-bit and 64-bit versions) </li>
<li>Support of Solaris Zones </li>
<li>Fix for defunct Process issue </li>
<li>The Cross Platform Agent may not discover soft partitions on Solaris systems. Therefore, the disk provider may be unloaded, and the Cross Platform Agent may stop collecting information from the system disks. </li>
<li>The Cross Platform Agent may not restart after the AIX server reboots. </li>
</ul>
<p>The latest versions of all the Operations Manager 2007 R2 Unix/Linux agents are included in this update.</p>
</blockquote>
<p>Perfect timing, I must say, since I really need this today. <img src='http://www.teknoglot.se/wp/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><em><strong>Update:</strong></em>    <br />This is no small MP-update, which probably is the reason that we do not find it in the MP Catalog, but a ~250MB OpsMgr R2 Software Update. You need to run this on all Operations Manager Servers (RMS/MS, GW?) since it actually updates many of the agent Cross Platform binaries. It does add a new MP för SUSE 11 that you have to import from disk if you need it.</p>
<p>So, the installation goes somewhat like this:</p>
<ol>
<li>Install the Software Update (pick the right Architecture) on all OpsMgr R2 Servers</li>
<li>Import the SUSE 11 MP if necessary</li>
<li>Re-discover your Unix/Linux machines.</li>
</ol>
<p>Files updated in this update for R2:</p>
<ul>
<li>.Microsoft.Enterprisemanagement.UI.Administration.dll (Version 6.1.7043.1)</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.aix.5.ppc.lpp.gz</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.aix.6.ppc.lpp.gz</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.hpux.11iv2.ia64.depot.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.hpux.11iv2.parisc.depot.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.hpux.11iv3.ia64.depot.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.hpux.11iv3.parisc.depot.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.rhel.4.x64.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.rhel.4.x86.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.rhel.5.x64.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.rhel.5.x86.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.sles.10.x64.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.sles.10.x86.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.sles.9.x86.rpm</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.solaris.10.sparc.pkg.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.solaris.10.x86.pkg.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.solaris.8.sparc.pkg.Z</li>
<li>.AgentManagementUnixAgentsscx-1.0.4-248.solaris.9.sparc.pkg.Z</li>
</ul>
<p>Files added:</p>
<ul>
<li>Microsoft.Linux.SLES.11.MP</li>
</ul>
<p>All in all, the update contains the following fixes:</p>
<ul>
<li>KB969342</li>
<li>KB973583</li>
<li>Q954049</li>
<li>Q956240</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/microsoft-adds-support-for-suse-11-in-opsmgr-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated: Operations Manager 2007 R2 Management Pack</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/updated-operations-manager-2007-r2-management-pack/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/updated-operations-manager-2007-r2-management-pack/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 10:29:00 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Management Pack]]></category>
		<category><![CDATA[OpsMgr]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/ms/opsmgr2007/updated-operations-manager-2007-r2-management-pack/</guid>
		<description><![CDATA[Microsoft released an updated MP (v6.1.7533.0, released on 10/8/2009) for monitoring the health the Operations Manager components. Most significant updates, according to me, would seem to be: Fixed an issue that was previously preventing all rules related to agentless exception monitoring from generating alerts. Added the rule “Collects Opsmgr SDK ServiceClient Connections” to collect the [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft released an updated <acronym title="Management Pack">MP</acronym> (v6.1.7533.0, released on 10/8/2009) for monitoring the health the Operations Manager components.</p>
<p>Most significant updates, according to me, would seem to be:</p>
<blockquote><p>Fixed an issue that was previously preventing all rules related to agentless exception monitoring from generating alerts.</p>
</blockquote>
<blockquote><p>Added the rule “Collects Opsmgr <acronym title="Software Development Kit">SDK</acronym> ServiceClient Connections” to collect the number of connected clients for a given management group. This data is shown in the view “Console and SDK Connection Count” under the folder “Operations ManagerManagement Server Performance”.</p>
</blockquote>
<blockquote><p>Updated a number of monitors and rules to ensure that data is reported to the correct management group for multihomed agents.</p>
</blockquote>
<blockquote><p>Fixed the configuration of the rule “IIS Discovery Probe Module Execution Failure” to so that the parameter replacement will now work correctly for alert suppression and generating the details of the alert’s description.</p>
</blockquote>
<p>The rest is mostly polishing, fine-tuning and complementary updates. Nothing really ground-breaking here, but still a welcome update.</p>
<p>Download at: <a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=61365290-3c38-4004-b717-e90bb0f6c148" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=61365290-3c38-4004-b717-e90bb0f6c148">http://www.microsoft.com/downloads/details.aspx?FamilyID=61365290-3c38-4004-b717-e90bb0f6c148</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/updated-operations-manager-2007-r2-management-pack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace/Change a Gateway Server</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/replacechange-a-gateway-server/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/replacechange-a-gateway-server/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 11:32:35 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/?p=207</guid>
		<description><![CDATA[If you are looking into replacing an (or just switching to another primary) Operations Manager 2007 Gateway Server for any reason, there&#8217;s a little more to consider than just right-clicking the clients and selecting &#8220;Change Primary Management Server&#8221; in the Operations Console. You could end up with agents not being able to connect to the [...]]]></description>
			<content:encoded><![CDATA[<p>If you are looking into replacing an (or just switching to another primary) Operations Manager 2007 Gateway Server for any reason, there&#8217;s a little more to consider than just right-clicking the clients and selecting &#8220;Change Primary Management Server&#8221; in the Operations Console.<br />
You could end up with agents not being able to connect to the Management Group at all due to a small problem with the order in which Operations Manager do things.</p>
<p>Here&#8217;s basically what happens:</p>
<ul>
<li>You tell Operations Manager to change Primary Management Server for AGENTX from GW1 to GW2.</li>
<li>The SDK Service (i guess) tells GW1 that &#8220;You&#8217;re no longer the Primary Management Server for AGENTX&#8221;</li>
<li>GW1 acknowledges this and stops talking to AGENTX.  And I mean <em>Completely</em> stops talking to AGENTX.</li>
<li>OpsMgr then tells GW2 to start accepting communication from AGENTX.</li>
<li>OpsMgr tries to tell AGENTX that it should talk to GW2 since GW1 won&#8217;t listen.</li>
</ul>
<p>Spotted the problem?<br />
This modus operandi probably works when agents are on the same network and in the same domain where fail-over is sort of automatic.  The problem we are facing now is that the server are telling the Gateway to stop accepting communications to and from the agent <em>before</em> the agent is notified that there is a new Gateway server to talk to. The agent will continue to talk to GW1 but will be completely ignored and you will probably start seeing events in the Operations Manager eventlog on GW1 with EventID 20000.</p>
<p>How do I get around this little <em>feature</em> then?</p>
<p>No matter if you found this article after running into the mentioned troubles or if you are googling ahead of time to be prepared, the fix is the same and consists of a few powershell scripts. These scripts are <a title="System Center Central" href="http://www.systemcentercentral.com/Forums/tabid/60/IndexID/19305/Default.aspx#vwcComments19305">out there</a> allready, but in different contexts, hence this post.</p>
<h3>First step:  Install the new Gateway</h3>
<p><a title="Deploying Gateway Server in the Multiple Server, Single Management Group Scenario" href="http://technet.microsoft.com/en-us/library/bb432149.aspx">Documentation on this</a> from Microsoft is good enough, but here&#8217;s the short version.</p>
<ol>
<li>Verify name resolution to and from Gateway server and Management Server</li>
<li><a title="Authentication and Data Encryption for Windows Computers in Operations Manager 2007" href="http://technet.microsoft.com/en-us/library/bb735408.aspx">Create certificate</a> for the Gateway server</li>
<li>Approve the Gateway server</li>
<li>Install Gateway server</li>
<li>Import certificates on Windows system</li>
<li>Run MOMCertImport.exe on Gateway server to add the certificate into Gateway server configuration</li>
<li>Wait</li>
</ol>
<p>The wait is for the gateway server to get all needed configuration from RMS and to download all neccesary management packs, run all the discovery scripts and so on. When the Operations Manager event log has calmed down a bit, move to step two.</p>
<h3>Second step: Configure Agent Failover</h3>
<p>Connect to an Operations Manager Command Shell. Any will do, as long as it&#8217;s connected to the correct Management Group.<br />
Then run the following script:</p>
<pre class="brush: powershell; title: ; notranslate">
$primaryGW= Get-ManagementServer | where {$_.Name -eq 'GW2.domain.local'}
$failoverGw = Get-ManagementServer | where {$_.Name -eq 'GW1.domain.local'}
$agents = Get-Agent | where {$_.primarymanagementservername -eq 'GW1.domain.local'}
Set-ManagementServer -AgentManagedComputer: $agents -PrimaryManagementServer: $primaryGW -FailoverServer: $failoverGw
</pre>
<p>Remember to change &#8220;GW1.domain.local&#8221; to you OLD Gateway servername and &#8220;GW2.domain.local&#8221; to your NEW Gateway servername.<br />
If you don&#8217;t know powershell, this script basically configures all agents using the old Gateway to use the new one as primare, but keep the old one as a fail-over server. The Gateways will still get to know the changes before the agents, but since the old on is still listening to the agents (though, as the fail-over host) it will be able to tell them to go to the new one, GW2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/replacechange-a-gateway-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

