Relevance for Total Disk and its corresponding partition

(imported topic written by SystemAdmin)

I am looking for the relevance to get the details of Disk information’s and its corresponding drive partitions

Example of O/P :

IBM 2107900 Multi-Path Disk Device, 1019 MB & Partition Drive 'UnKnown ’

IBM 2107900 Multi-Path Disk Device, 5199 MB & Partition Drive ‘E:-5199 MB’

IBM ServeRAID M1018 SCSI Disk Device, 25145 MB & Partition Drive ‘Q:-25145 MB’

IBM ServeRAID M1018 SCSI Disk Device, 25145 MB & Partition Drive ‘C:-12573 MB’,‘D:-12570 MB’

I used below relevance found in the same forum and its o/p which gives only the disk information

if (exists wmi) then (string value of property “caption” of it, (string value of property “size” of it as integer / 1024/1024/1024) as string & " GB") of (select objects “Caption, size from Win32_DiskDrive” of wmi) else nothings

IBM 2107900 Multi-Path Disk Device, 1019 MB

IBM 2107900 Multi-Path Disk Device, 5199 MB

IBM ServeRAID M1018 SCSI Disk Device, 25145 MB

IBM ServeRAID M1018 SCSI Disk Device, 25145 MB

Can any one help me to find the appropriate relevance I am looking for!

Thank you

(imported comment written by jgolembi)

With Win32_LogicalDisk you can get size and Drive letter.

if (exists wmi) then (string value of property "caption" of it,string value of property "SystemName" of it, (string value of property "size" of it as integer / 1024/1024/1024) as string & " GB ",  (string value of property "freespace" of it as integer / 1024/1024/1024) as string & " GB") of (select objects "Caption,FreeSpace,SystemName,Size from Win32_LogicalDisk" of wmi) else nothings

-John G

(imported comment written by SystemAdmin)

John, Thanks for the reply.

I am looking for the relevance so that it has to return both in a single relevance o/p.

Say my system is having Three physical disks (disk1,disk2,disk3) and size is 100 GB each and I made 2 logical Partitions of disk1 as (C: & D:)

and disk2 (F:) and disk3 (unpartitioned). so that output should be like

disk1 --100 GB–C:,D:

disk2 --100 GB–F:

disk3 --100 GB–unpartitioned

will it possible to get the o/p of two different objects in a single relevance?