(imported topic written by Steve91)
Hi Guys
I’m running the following query across our server estate, this should pick up drive labels, captions and freespace.
This works for Fixed disks and Mountpoints
But it’s proving a bit hit and miss
On some servers I get a complete set of results such as below:
q:(string value of property “Label” of it, string value of property “Caption” of it, (string value of property “Capacity” of it as integer / 1024/1024) as string & " MB") of (select objects “Label, Caption, Capacity from Win32_Volume” of wmi)
A: AAP271P_C, C:, 8628 MB
A: AAP271P_D, D:, 34521 MB
A: MP_D_STS, D:\MP_D_STS, 17256 MB
A: MP_D_AFI, D:\MP_D_AFI, 6963 MB
A: Available1, \?\Volume{046aee5b-4b6b-413c-8b15-6e7bd9ec3214}, 34521 MB
A: MP_D_ProbeData, D:\ProbeDat, 77675 MB
A: MP_D_PENS, D:\MP_D_PENS, 130768 MB
A: MP_D_SMALLDB, D:\MP_D_SMALLDB, 43727 MB
A: MP_D_INVST, D:\MP_D_INVST, 33703 MB
A: MP_D_FMR, D:\MP_D_FMR, 8627 MB
A: MP_D_ServiceRequests, D:\MP_D_ServiceRequests, 51777 MB
A: MP_D_WFM, D:\WFM, 60414 MB
A: MP_D_SYSDB, D:\MP_D_SYSDB, 9215 MB
A: MP_D_ANFP, D:\MP_D_ANFP, 25884 MB
A: MP_D_BIWarehouse, D:\MP_D_BIWarehouse, 276179 MB
A: MP_D_Filesafe, D:\MP_D_Filesafe, 8633 MB
A: MP_D_LARA, D:\MP_D_LARA, 8622 MB
A: MP_D_SMS, D:\MP_D_SMS, 8627 MB
A: MP_D_CRE, D:\MP_D_CRE, 17256 MB
A: MP_D_ReconciliationsP, D:\MP_D_ReconciliationsP, 17256 MB
A: AAP271P_E, E:, 17260 MB
A: Available2, \?\Volume{5cbeffd5-2994-435a-b279-56120a079d86}, 34521 MB
Where as on other servers I get the following:
q:(string value of property “Label” of it, string value of property “Caption” of it, (string value of property “Capacity” of it as integer / 1024/1024) as string & " MB") of (select objects “Label, Caption, Capacity from Win32_Volume” of wmi)
A: AAP225P_C, C:, 8628 MB
E: Singular expression refers to nonexistent object.
…I know this server has 3 fixed disks and 3 mountpoints.
I think it may crashing out on the CD-ROM as it doesn’t have a Label or Capacity value and not displaying the next value.
Any idea how I can modify my relevance to get around this?
Many thanks
Steve