Solved

Win32_LogicalDisk broken?

Posted on 2009-05-18
2
356 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 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now