<?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>Wed, 28 Sep 2011 07:37:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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>1</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>
		<item>
		<title>The TCP Port Check: Use with caution!</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/tcp-port-check-use-with-caution/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/tcp-port-check-use-with-caution/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:39:43 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/?p=202</guid>
		<description><![CDATA[Just wanted to raise a word of caution about the TCP Port Check in Operations Manager 2007. Some customers have notices the the system-logs on some Unix machines are completely swamped with &#8220;connection error&#8221;, &#8220;TCP Connect failed&#8221;, &#8220;TCP Session Lost&#8221; and similar and after a bit och research the problematic servers were narrowed down to [...]]]></description>
			<content:encoded><![CDATA[<p>Just wanted to raise a word of caution about the TCP Port Check in Operations Manager 2007.</p>
<p>Some customers have notices the the system-logs on some Unix machines are completely swamped with &#8220;connection error&#8221;, &#8220;TCP Connect failed&#8221;, &#8220;TCP Session Lost&#8221; and similar and after a bit och research the problematic servers were narrowed down to those monitored by Operations Manager. Specifically, those who are targeted by a TCP Port Check.</p>
<p>It would seem like the TCP-connection never fully initializes on the target server. Kind of like knocking on your neighbours door and then hiding. Then when the door opens, no one is there.</p>
<p>Maybe there&#8217;s a setting somewhere to modify how &#8220;deep&#8221; a Port Check should go before closing. Perhaps fully initializing and then sending a proper &#8220;Close&#8221; instead of just cutting the connection. In a few extreme cases we have noticed that the target server even goes so far as to start a session, but never ending it since there&#8217;s no closure and finally having no sessions to spare for the real users. But on most servers it&#8217;s just an annoyance since the &#8220;real&#8221; errors is very hard to be found in all the connection related logs.</p>
<p>Anyway. Just a good thing to keep in mind when running TCP Port Checks from Operations Manager 2007. Keep an eye on the logs when implementing the port checks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/tcp-port-check-use-with-caution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSMQ Management Pack: Subscript Out of Range</title>
		<link>http://www.teknoglot.se/ms/opsmgr2007/msmq-mp-subscriptoutofrange/</link>
		<comments>http://www.teknoglot.se/ms/opsmgr2007/msmq-mp-subscriptoutofrange/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 08:51:01 +0000</pubDate>
		<dc:creator>Sam T</dc:creator>
				<category><![CDATA[OpsMgr 2007]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Fixed]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Quick-fix]]></category>

		<guid isPermaLink="false">http://teknoglot.hartati.se/?p=182</guid>
		<description><![CDATA[UPDATE: This problem seems to be fixed in the latest update! The MSMQ Management Pack seems to have a few problems with it&#8217;s discovery script that can lead to the following error showing up in the logs: This seems to be related to the discovery of public queues on some servers that has none. One [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #800000;"><span style="text-decoration: underline;">UPDATE: This problem seems to be fixed in the latest update!</span></span></p>
<p>The MSMQ Management Pack seems to have a few problems with it&#8217;s discovery script that can lead to the following error showing up in the logs:</p>
<pre class="brush: plain; title: ; notranslate">
The process started at 13:34:40 failed to create System.Discovery.Data. Errors found in output:

C:Program FilesSystem Center Operations Manager 2007Health Service StateMonitoring Host Temporary Files 499788DiscoverQueues.vbs(107, 4) Microsoft VBScript runtime error: Subscript out of range: '[number: 0]'

Command executed: &quot;C:WINDOWSsystem32cscript.exe&quot; /nologo &quot;DiscoverQueues.vbs&quot; {615D37C9-477D-62E2-0833-6ECBF0E89A87} {A176AC83-CC31-01C3-5DE9-E2DFF64E7CC7} &quot;MASKED.server.fqdn&quot; &quot;MSMQ&quot; &quot;true&quot; &quot;true&quot; &quot;False&quot; &quot;false&quot;
Working Directory: C:Program FilesSystem Center Operations Manager 2007Health Service StateMonitoring Host Temporary Files 499788

One or more workflows were affected by this.

Workflow name: Microsoft.MSMQ.2003.DiscoverQueues

Instance name: MASKED.server.fqdn

Instance ID: {A176AC83-CC31-01C3-5DE9-E2DFF64E7CC7}

Management group: MASKED
</pre>
<p>This seems to be related to the discovery of public queues on <em>some</em> servers that has none. One quick fix, or rather work-around, is to override the discovery on these servers to set <code>DiscoverPublic</code> to <code>False</code>.<br />
<img class="size-full wp-image-183" title="screenshot1245833173" src="http://www.teknoglot.se/wp/wp-content/uploads/2009/06/screenshot1245833173.png" alt="Screenshot of Override" width="626" height="26" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.teknoglot.se/ms/opsmgr2007/msmq-mp-subscriptoutofrange/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

