Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » VBScript » Custom script

List Disk Quota Settings on the Local Computer

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.

Example(s)

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

Wscript.Echo "Default quota limit: " & colDiskQuotas.DefaultQuotaLimit
Wscript.Echo "Default warning limit: " & _
    colDiskQuotas.DefaultQuotaThreshold
Wscript.Echo "Record quota violations in event log: " & _
    colDiskQuotas.LogQuotaLimit
Wscript.Echo "Record warnings in event log: " & _
    colDiskQuotas.LogQuotaThreshold