Free Tool: RegKeyToMOF

Here is a link to a free tool that automatically generates the MOF syntax for a given registry key. It has a nice, simple GUI that allows you to easily navigate down to the registry key you’re looking for. As soon as you click on the one you want, it generates the MOF syntax for the Configuration.mof and SMS_Def.mof files, as well as SMS_Def.mof for SMS 2003.

This makes it easy to extend ConfigMgr hardware inventory to include registry information!

http://myitforum.com/cs2/blogs/rtrent/archive/2009/04/13/regkey-to-mof-utility.aspx

IIS 5.1 (Windows XP) Error Message

You may see an Error icon appear in the IIS 5.1 Management Console, and a message stating “Unexpected error 0x8ffe2740 occurred“. This can occur on Windows XP if WinRM (Windows Remote Management) is running. WinRM is Microsoft’s implementation of the DMTF’s WS-Management standard, and runs on port 80. This can cause a port conflict, and prevent the IIS service from starting.

To resolve this issue, stop the Windows Remote Management service on the system, and then start the IIS service.

HP BIOS Update Utility Error

So, I was running HP’s HPQFlash.exe utility on a Dell laptop (Latitude E6400), and I got an error message saying “This system does not contain the necessary WMI support for this version of HPQFlash. Please use a version of HPQFlash prior to version 4.0.

Obviously I don’t expect HPQFlash to work on a Dell system, but I found it odd nonetheless. I wonder what “WMI support” it’s looking for. Dell’s BIOS update packages can optionally use the root\DellOMCI:Dell_Configuration WMI class’ FlashBios WMI method, but I don’t believe that the OMCI is required in order to run a Dell BIOS update from Windows. In fact, I’m relatively sure that it’s not required.

Hmmm, interesting ….

WMI Documentor

Here is a crude, but functional Visual Basic (VB) script that I wrote to document WMI classes, methods, and properties in Microsoft Excel so that they are searchable.

Option Explicit

dim TargetWmiNs, Excel, Row, tWmiClass, WmiClasses
‘*** Set this variable to the target WMI namespace to document
TargetWmiNs = “\\remotecomputer\root\sms\site_lab”

‘*** Create Excel object
set Excel = CreateObject(“Excel.Application”)
call Excel.Workbooks.Add()
‘*** Make Excel window visible
Excel.Visible = true
wscript.sleep 500

set WmiClasses = GetObject(“winmgmts:” & TargetWmiNs).Subclassesof

Row = 1

for each tWmiClass in WmiClasses
if Left(GetClassNameFromPath(tWmiClass.Path_), 2) <> “__” then
dim WmiQualifier
Excel.Cells(Row, 1).Value = “Class”
Excel.Cells(Row, 2).Value = GetClassNameFromPath(tWmiClass.Path_)
Excel.Cells(Row, 1).Interior.Color = 5880731

‘*** Write DisplayName WMI qualifier to Excel
for each WmiQualifier in tWmiClass.Qualifiers_
if WmiQualifier.Name = “DisplayName” then Excel.Cells(Row, 2).Value = WmiQualifier.Value
next

call WritePropertyInfo(tWmiClass)
call WriteMethodInfo(tWmiClass)

Row = Row + 1
end if
next

‘ Extract a class name from the full WMI path
function GetClassNameFromPath(WMIClassPath)
dim TempPath
TempPath = Split(WMIClassPath, “:”)
GetClassNameFromPath = TempPath(1)
end function

Function WritePropertyInfo(WmiClass)
dim WmiProperty
‘*** Write property information to Excel
for each WmiProperty in WmiClass.Properties_
Row = Row + 1
Excel.Cells(Row, 1).Value = “Property”
Excel.Cells(Row, 1).Interior.Color = 12419407
Excel.Cells(Row, 1).Font.Color = 0
Excel.Cells(Row, 2).Value = WmiProperty.Name
Excel.Cells(Row, 3).Value = WmiProperty.IsArray
next
End Function

Function WriteMethodInfo(WmiClass)
dim WmiMethod
‘*** Write WMI method information to Excel
for each WmiMethod in WmiClass.Methods_
Row = Row + 1
Excel.Cells(Row, 1).Value = “Method”
Excel.Cells(Row, 1).Interior.Color = 5066944
Excel.Cells(Row, 1).Font.Color = -1
Excel.Cells(Row, 2).Value = WmiMethod.Name
next
End Function