Your company's ad could live here and reach over 50,000 people a month!

Share This Post

MOF extension to get Physical Hard Drive Serial Number

In either ConfigMgr or SMS, add this mof snippet to sms_def.mof in inboxes\clifiles.src\hinv on your primary sites.  Note for the SMS2003 admins: no mofcomp’ing required on your clients; this is a server-side only edit.

[ SMS_Report     (TRUE),
SMS_Group_Name (“Physical Media”),
SMS_Class_ID   (“CUSTOM|PHYSICAL_MEDIA|1.0”) ]

class Win32_PhysicalMedia : SMS_Class_Template
{
[SMS_Report (TRUE)     ]        string     SerialNumber;
[SMS_Report (TRUE), key]        string     Tag;
};

 

Sample Report; remember to add the prompt for ComputerName

select distinct sys.netbios_name0, dsk.Model0, 
Phys.Tag0, Phys.SerialNumber0 from v_gs_physical_media0 as Phys
inner join v_r_system as sys on sys.resourceid=phys.resourceid
inner join v_gs_disk as dsk on Phys.resourceid=dsk.resourceid
where 
sys.netbios_name0 = @ComputerName 
and dsk.deviceid0=Phys.tag0
order by Phys.tag0

 

ResourceExplorerSample:

ResourceExplorerSample

ReportSample:

ReportSample

Share This Post

Sherry Kissinger is a App Systems Engineer with Wells Fargo. She has been working with SMS since version 2.0. She participates in Microsoft newsgroups, forums on myITForum.com and the myITForum.com mailing list. She also specializes in automating software deployment using Windows Installer, Transforms, and vbscripting. She also answers questions posed to the "mofmaster@myitforum.com"

Leave a Reply