?
Solved

Win32_LogicalDisk broken?

Posted on 2009-05-18
2
Medium Priority
?
387 Views
Last Modified: 2013-11-25
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

0
Comment
Question by:timbrigham
2 Comments
 
LVL 41

Accepted Solution

by:
graye earned 2000 total points
ID: 24433778
It could be a "provider error" (for example about 5% of my PCs return a provider error when using Win32_CDROMDrive)
However, I'd recommend that you run the WMI Diagnostics on one of those PCs first to see if perhaps there is a corrupted repository : http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=en
0
 
LVL 1

Author Comment

by:timbrigham
ID: 24530383
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.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question