Hard Disk Serial Number

(imported topic written by Ashwin.D91)

Hey guys,

Is there any query that anybody uses that gives satisfactory results for this? At the moment, I’m pulling information from win32_physicalmedia of wmi and a lot of my computers do not report saying not retrievable. Almost 75%.

Here’s the relevance that I use.

if (exists (string values of selects “SerialNumber from win32_physicalmedia” of wmi)) then ((string values of selects “SerialNumber from win32_physicalmedia” of wmi) as trimmed string) else “Serial Number not Retrievable”

(imported comment written by mcalvi91)

here is what we use…It functions fairly well.

if (exists wmi) then (((substrings after “=” of (property “model” of it as string)) of select object “* from win32_diskdrive where InterfaceType != ‘USB’” of wmi) as string, ((substrings after “=” of (property “SerialNumber” of it as string)) of select objects “* from win32_PhysicalMedia where SerialNumber != ‘’” of wmi) as string ) else (“n/a”, “n/a”) as plural