Link to home
Start Free TrialLog in
Avatar of timbrigham
timbrighamFlag for United States of America

asked on

Win32_LogicalDisk broken?

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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of timbrigham

ASKER

Graye, thanks. Your comments helped me rule out my initial assumption and get on the right track. It is some kind of permission error. When the script is run as an administrator on the machine everything is fine, but non admins receive this partial output.