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:
- 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!
- 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.


This is good information.
Will this show up in resource explorer or will I have to write a report to see the data?
Thanks for sharing.
MIke, thanks for commenting. I am ashamed to say that this method I posted does not work reliably. The HBA info in the microsoft WMI namespace for some reason just disappears. I wrote a new way of doing the same thing and will post on it soon.
The data is viewable in Resource explorer…I will comment on that in the blog post as well.
Thanks,
Steve
I look forward in reading your next post.
Thanks
Mike
I have updated the post and the process listed now does work correctly.
Hi. Thanks for this tutorial.
I’m tryng to get data from my HBAs, but in Windows Server 2008, the script doesn’t work.
I get this error:
GetHBAInfo.vbs executing on RAFAEL
System appears to be 64bit. Setting execution path to ‘%WinDir%\Sysnative’
Adding ‘%WinDir%\Sysnative’ to PATH statement.
Retrun code from appending to PATH: 0
Executing ‘fcinfo.exe /details’ command
Retrun code from executing command: -2147024894
fcinfo.exe could not be found. Exiting script.
Thanks for your help and sorry my english.
Hi Franco.
I tested the script on Win2003 (64bit and 32bit) and on Win2008 R2…it worked great for me so I am confused. If you run fcinfo from a command prompt on the server do you get HBA info returned? I suppose it could be UAC related…you might try disabling UAC temporarily to verify.
Good luck,
Steve
Hi. Thanks for the post, is really usefull.
I follow all the steps, but the script doesn’t work in Windows Server 2008.
HPinfo is installed, and the script works when I run it using my account and logged into the server. But when the script runs using SCCM tasks, the log says “fcinfo.exe could not be found. Exiting script.”.
Can be UAC? Can elevate script execution?
Thaks for the help and sorry my english.
Sorry for the double post.
I tried disabling UAC and the same result. The script runs perfectly when I’m logged in the server, but doesn’t works from the task in SCCM.
¿Some special conditions in Environment tab of the task’s program?
Thanks for the help once more, and one more time, sorry my english.
I also got an error when installing on Win2008…you get it because it is trying to create a WMI class that already exists (MSFC_FCAdapterHBAAttributes). In my case the utility was still put in place and I could use it. You actually don’t need to install fcinfo to use the command…just make sure FCINFO.EXE, HBAAPI.DLL, HBATAPI.DLL are all in a common folder.
You can try querying the MSFC_FCAdapterHBAAttributes class directly, but in my experience the information from WMI was not reliable.