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 was tested using Object REXX 2.1.0 for Microsoft Windows, available from IBM.

Object REXX
Edit|Remove
strComputer = "."
objWMIService = .OLEObject~GetObject("winmgmts:\\"||strComputer||"\root\CIMV2")
do objItem over objWMIService~ExecQuery("Select * from Win32_DiskQuota")
    say "Disk Space Used:" objItem~DiskSpaceUsed
    say "Limit:" objItem~Limit
    say "Quota Volume:" objItem~QuotaVolume
    say "Status:" objItem~Status
    say "User:" objItem~User
    say "Warning Limit:" objItem~WarningLimit
end