Archive for January, 2010

Extend System Center Configuration Manager 2007 to Collect Fibre Channel HBA Information – Revised

January 6th, 2010

Version 2…

In my original post on this subject I described how to set up ConfigMgr to grab data from the MSFC_FCAdapterHBAAttributes class under Root\wmi.   Later I found out that, as least in my environment, the data in this class was unreliable.  It would literally be there one day and the next it would have disappeared.  So I had to change my approach.  This new method of getting HBA info into ConfigMgr is not exactly elegant, but it is effective.  Use it at your own risk! The process is as follows:

  1. Install Microsoft’s FCInfo utility on your machines with HBAs.  I packaged this up and deployed to a collection populated with these machines.  Note that the install will throw an error on Windows Server 2008 but the utility still works and it MUST be present for this process to work!
  2. Update sms_def.mof to look for HBA info in a new class called Custom_HBA_Info (later steps actually create this class).  Add the below text to your sms_def.mof (always make a backup first!).

#pragma namespace ("\\\\.\\root\\CIMv2\\sms")
[SMS_Report(TRUE),
SMS_Group_Name("Custom_HBA_Info"),
SMS_Class_ID("Microsoft|Custom_Frost_HBA_Info|1.0"),
Namespace("\\\\\\\\.\\\\root\\\\CIMv2")]
class Custom_HBA_Info : SMS_Class_Template
{
[SMS_Report(TRUE), key ]
string	Adapter;
[SMS_Report(TRUE)]
string	NodeWWN;
[SMS_Report(TRUE)]
string	PortWWN;
[SMS_Report(TRUE)]
string	SerialNumber;
[SMS_Report(TRUE)]
string	DriverName;
[SMS_Report(TRUE)]
string	DriverVersion;
[SMS_Report(TRUE)]
string	FirmwareVersion;
[SMS_Report(TRUE)]
datetime DateCollected;
};

Almost immediately after saving the sms_def.mof file ConfigMgr will compile it.  You can monitor the success/failure of this in the dataldr.log file on the ConfigMgr server (<install_dir>\Logs).

3.  Download my script (rename to GetHBAInfo.vbs)  to a share on your network.  The script creates the WMI class referenced above, runs fcinfo.exe, grabs the output, and populates it into Custom_HBA_Info.

4.  Create a Software Distribution package for the script.  Create a Program for the package with the following command line: %systemroot%\system32\cscript.exe GetHBAInfo.vbs

5.  Schedule a recurring advertisement associated with a collection containing all your machines with HBAs.  My advertisement runs once per week.

Thats it.  Now, to be sure it is working:

1.  Run your advertisement so that the script runs on your agents with HBAs.

2.  On one of those computers use wmic to validate the presence of the namespace.  Command syntax:

wmic path Custom_HBA_Info

If an Invalid Class error is displayed then either the script has not run or it has an error.  The script logs it’s results under %windir%\Temp in a file that starts with GetHBAInfo_<date>_<time>.log.

3.  Force a couple of agents to run their hardware inventory.  Monitor the dataldr.log on the site server.  You should see lots of data flying by as the agent updates it hardware info.  When complete search for the string “Custom_HBA_Info”.  If you find it then the data should have gotten put in your site database.  Look for a table in the database called dbo.Custom_HBA_Info_Data.  If it exists then you should be golden.

4.  Use Resource Explorer to view one of your machines with HBAs.  Under Hardware you should see Custom_HBA_Info, and your data should be there.

Special thanks to my co-worker Jason Sandys, a ConfigMgr MVP.  Without his assistance I would not have gotten this to work.