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

email

Written by , Posted .