(imported topic written by mcalvi91)
I am trying to create a property which lists the hardrive model (name) and serial number of the device. I am able to get the following two properties to work but I want to be able to join them together.
q: (substrings after “=” of (property “model” of it as string), substrings after “=” of(property “Name” of it as string) )of select object “* from win32_diskdrive where InterfaceType != ‘USB’” of wmi
A: Hitachi HDS721680PLA380, \.\PHYSICALDRIVE0
T: 23.958 ms
I: plural ( substring, substring )
q: ((substrings after “=” of (property “SerialNumber” of it as string)), substrings after “=” of (property “tag” of it as string) ) of select objects “* from win32_PhysicalMedia where SerialNumber != ‘’” of wmi
A: PVFB44ZLU0ZTGE, \.\PHYSICALDRIVE0
T: 96.309 ms
I: plural ( substring, substring )
As you can see they are two different WMI calls but can be joined by the “\.\PHYSICALDRIVE0” attribute. Is there any way to join them and get the output in the format below?
Hitachi HDS721680PLA380, PVFB44ZLU0ZTGE
I would like it in this format because some of our systems may have multiple physical disks present.