…completes. But - that doesn’t give me the results I’m looking for. I have a custom property, HWSerialNumber that I would like to collect for all machines, both Windows and Unix. In Windows, that’s easy:
if (exists wmi) then (string values of selects “IdentifyingNumber from Win32_ComputerSystemProduct” of wmi) else (“N/A”)
…but without DMI working from a relevance perspective, I can’t get the HWSerialNumber from Linux servers. I suspect I’m going to run into the same problem with AIX, Solaris, etc…
Here’s the code I’m tinkering with:
if (name of operating system as lowercase starts with “win”) then (if (exists wmi) then (string values of selects “IdentifyingNumber from Win32_ComputerSystemProduct” of wmi) else (“N/A”)) else (if (name of operating system as lowercase starts with “lin”) then ("/usr/sbin/dmidecode -s system-serial-number") else “dunno”)