I've been using the the following WQL select statement for some time, but recently it stopped working, around time time windows power shell auto installed. The syntax might be a little off - I rewrote this from a a Perl function.
This used to pull the name,free space, and size from all the disks. Recently, some of entries have stopped returning data. It appears to mostly be occurring on USB and SAN disks, but it isn't limited to those situations.
Any suggestions as to a cause or a solution?
select Size,FreeSpace,DeviceID,VolumeName from Win32_LogicalDisk where DriveType=3