I am trying to figure out how I can determine if a disk partition is configured as a dynamic volume or basic disk. I am trying to create a reporting utility that will query remote machines and return the information. There could be one volume or there could be 10-20 volumes. It varies with machine.

I tried to use WMI using the Win32_LogicalDisk and Win32_Volume classes (Win32_Volume class is only available on Windows Server 2003 and up, and some of these machines run Windows 2000... very rare but there are a few), and when I tried to use these classes it returned information about the disks and volumes, but there are no flags that displayed if it was a dynamic volume or basic disk.

I have found some code on how to access the Logical Disk Manager data which stores this information, but it is in C++ and I don't really understand it. It also looks as if you cannot run this code remotely... so.. my question is..

Is it possible to do this another way? Are there API calls or through another method or service can I access this information? Possibly through the Logical Disk Manager? Thanks.