ProblemYou want to view the quota usage for one or more users. SolutionUsing a graphical user interface
Using a command-line interfaceUse the following command to view the quota usage for all users on drive D: > fsutil quota query d: Use the following command to search the event log for all users that are violating their quota: > fsutil quota violations
Using VBScript' This code displays the quota usage for users on a particular drive. ' ------ SCRIPT CONFIGURATION ------ strComputer = "." strDrive = "<Drive>" ' e.g. D: ' ------ END CONFIGURATION --------- set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colQuotas = objWMI.ExecQuery("select * from Win32_DiskQuota " & _ "where QuotaVolume = 'Win32_LogicalDisk.Device" & strDrive & """'") for each objQuota in colQuotas WScript.Echo "User: "& objQuota.User WScript.Echo " Volume: "& objQuota.QuotaVolume WScript.Echo " Quota Limit: " & _ objQuota.Limit / 1024 / 1024 & "MB" WScript.Echo " Warning Limit: " & _ objQuota.WarningLimit / 1024 / 1024 & "MB" WScript.Echo " Disk Space Used: " & _ objQuota.DiskSpaceUsed / 1024 / 1024 & "MB" WScript.Echo "" next DiscussionOne of the nice features of the Quota Entries application is that you can drag-and-drop entries in it to a spreadsheet application like Excel. Simply highlight the entries you're interested in and drag them to Excel. You can also copy and paste them using Ctrl-C and Ctrl-V. If you've enabled compression on a volume where quotas are also enabled, you may actually see quota usage increase compared to the same volume without compression. See AlsoRecipe 7.16 for enabling disk quotas for users; MS KB 307984, "HOW TO: Create Disk Quota Reports in Windows XP," MS KB 308664, "How To Export and Import Disk Quota Settings to Other Volumes in Windows XP," and MS KB 320686, "Disk Quota Charges Increase If You Turn On the NTFS Compression Functionality" |