Short VBS code - get a single specified instance of Win32_DiskQuota class or get a default unnamed instance (singleton) of the class, using one single command GetObject with exact path of the wmi object.
Quickest and most efficient VB Script code to get a single instance by a key - SWbemServices.Get
Get a specified instance of Win32_DiskQuota by key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this VB Script.
List of all instances, wmi class Win32_DiskQuota.
<a></a>
<a href="http://include.wutils.com/wmi/ROOT%5Ccimv2/Win32_DiskQuota.html#">>></a>
Name
CIMType
IsArray
IsLocal
Origin
read
Units
write
key
ValueMap
Qualifiers
DiskSpaceUsed
21,uint64
NO
YES
Win32_DiskQuota
True
"Bytes"
-
Limit
QuotaVolume
Status
19,uint32
Array["0","1","2"]
User
WarningLimit
Number of instances: 9999, Key Names:QuotaVolume,User
Value
ToInstance
ToSubclass
Overridable
Amended
Local
Association
CreateBy
"PutInstance"
DeleteBy
"DeleteInstance"
dynamic
Locale
&1033
provider
"DskQuotaProvider"
SupportsCreate
SupportsDelete
SupportsUpdate
UUID
"B94560CA-41CC-4FB5-BD56-282329DA41DA"
CimType
Array
__PATH
"\\TRIPLE\ROOT\cimv2:Win32_DiskQuota"
___SYSTEM
8
False
__NAMESPACE
"ROOT\cimv2"
__SERVER
"TRIPLE"
__DERIVATION
Array[]
__PROPERTY_COUNT
&6
3
__RELPATH
"Win32_DiskQuota"
__DYNASTY
__SUPERCLASS
__CLASS
__GENUS
&1
本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/archive/2012/04/09/2439064.html,如需转载请自行联系原作者。