' List Disk Space by User Using Disk Quotas


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colQuotas = objWMIService.ExecQuery("Select * from Win32_DiskQuota")

For Each objQuota in colQuotas
    Wscript.Echo "Volume: "& objQuota.QuotaVolume
    Wscript.Echo "User: "& objQuota.User      
    Wscript.Echo "Disk Space Used: "& objQuota.DiskSpaceUsed
Next

search for scripts

VbsEdit contains all these sample scripts!





Home   Scripts

Copyright © 2001-2019 adersοft