System Center Operations Manager 2007 is great, don’t get me wrong. But it does have it’s oddities - and one of those are messages such as these:
Details:Health service ( A63BAA7B-20B1-D6C0-75B9-8A8CE3DD7E02 ) should not generate data about this managed object ( 021971E6-1EFB-E123-7E2A-452ADB511016 ).
Now, we know that Health Service ID is referring to a specific agent, but which one? Luckily, this is fairly easy to figure out. Just hop onto the database server and run the following query:
SELECT DisplayName FROM BaseManagedEntity WHERE BaseManagedEntityId = ‘THE ID’
It should return the DisplayName property of said ID, which is the agent you’re looking for.
In fact, to go a step further - if you have many queries like this, you could write a PowerShell function to simplify things for you - here’s a real rough outline:
Write-Host"HSID $HSID is associated with the following agent:"
$ds.tables
}
Like I said, the script is fairly basic and assumes a trust relationship with the database. It also expects a valid HSID - I’ll clean it up later. Edit the script, entering in your SCOM DB and DB Name if necessary, then add it to your $PROFILE. Then it’s as simple as Get-AgentByHSID “long health service guid” and it does all the heavy lifting.
I was messing around with code this week and a thought hit me - wouldn’t it be cool if someone animated the MN DOT traffic map? Hell yeah it would be! So I wrote a bot, called SnapShot, that sucks images off websites at a regular interval. Aimed it at the DOT website, and waited 24 hours. Then I took the 2100+ images and some Nekromantix and pow, there you have it - a neat little video. Check it out below!
It starts out slow and ends slow - but it’s traffic from Midnight to Midnight, so what did you expect? Also, you’ll notice occasional ‘glitches’ - this is when I’d be downloading a picture at the same time their system was generating one, so I’d receive half an image or less. Opps. I have ideas for another one, which might be a little neater looking.
Additionally, I’ll be have a small exhibition at the Black Dog Coffee and Wine Bar in downtown St. Paul starting April 29th - come check it out
In the MS Press book “Windows PowerShell Scripting Guide” one of the first scripts listed is how to detect, via WMI & VBScript, whether or not PowerShell is installed.
In the book, it says that the best way to locate PowerShell is to use it’s QFE hotfix ID, which is listed as “928439″. This will only work with Windows Vista. If you’re using Windows XP or Windows 2003, the hotfix number if PowerShell is installed will be “926139″.
I’ve edited the original script included with the MS Press book and have added a function to determine which OS we’re looking at, then search for the corresponding hotfix ID.
In the book, it says that the best way to locate PS is to use it’s QFE hotfix ID, which is “928439″. This is, however, an incorrect hotfix ID, at least now. The most current one is 926139, which is listed as SP3. I assume 928439 was the original number, before SP3 was thought of. Not to mention, they improperly format the WMI query, so even if you used the correct number, it wouldn’t show. Note: This is on Windows XP SP2, I’m unsure if this is on other versions as well.