Enumerates disk quota information (including user name, warning and quota limits, and disk space used) for each disk quota entry on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more information on downloading these items see the Windows PowerShell download page (right).

$strComputer = "."

$colItems = get-wmiobject -class "Win32_DiskQuota" -namespace "root\CIMV2" `
-computername $strComputer

foreach ($objItem in $colItems) {
      write-host "Disk Space Used: " $objItem.DiskSpaceUsed
      write-host "Limit: " $objItem.Limit
      write-host "Quota Volume: " $objItem.QuotaVolume
      write-host "Status: " $objItem.Status
      write-host "User: " $objItem.User
      write-host "Warning Limit: " $objItem.WarningLimit