Set colDiskQuotas = CreateObject("Microsoft.DiskQuota.1") colDiskQuotas.Initialize "C:\", True
If colDiskQuotas.QuotaState = 2 Then Wscript.Echo "Quota state: Enabled and enforced" ElseIf colDiskQuotas.QuotaState = 1 Then Wscript.Echo "Quota state: Enabled but not enforced" Else Wscript.Echo "Quota state: Disabled" End If