By David Wiseman (Administrator)Created 20 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:5103
Downloads:23

List Disk Quota Entries

Language:  KiXtart

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 No Windows NT No
Vista Unknown Windows 2008 Unknown
Description

Enumerates disk quota information (including user name, warning and quota limits, and disk space used) for each disk quota entry on a computer.

Code

Line Numbers: On  Off      Plain Text
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_DiskQuota")
For Each $objItem in $colItems
    ? "Disk Space Used:" + $objItem.DiskSpaceUsed
    ? "Limit:" + $objItem.Limit
    ? "Quota Volume:" + $objItem.QuotaVolume
    ? "Status:" + $objItem.Status
    ? "User:" + $objItem.User
    ? "Warning Limit:" + $objItem.WarningLimit
Next

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
MichaelMCarver
Posted On: 8/23/2019 8:52:44 PM

Oh this is very keen topic.Last year I was going through same phase with my child and on other hand I was stuck in Edu Birdie urgent project but anyhow all went peacefully.This is very good post.

annashetty
Posted On: 9/16/2019 7:32:56 AM

I tried to learn and still study it, and found it harder than I thought wuxiaworld

Jacob Wills
Posted On: 11/28/2019 3:29:16 PM

I have been facing problems to find some logical errors in the program but your article helped me to find them all. I am amazed to get assignment help service for my essays. I would share this article with my university's friends so that they complete their assignment.