Formal WMIC command syntax

The WMIC command-line BNF:

<WMI Command>

::=

[<global switch list>] <command>

<global switch list>

::=

<global switches> | <global switches> <global switches list>

<global switches>

::=

(/NAMESPACE | /ROLE ) [:<namespace>] |
/NODE [:<computer id list>] |
/IMPLEVEL [:<ilevel>] |
/AUTHLEVEL [:<alevel>] |
/LOCALE [:<locale identifier>] |
/PRIVILEGES [:<property>] |
/TRACE [:<option>] |
/RECORD [:<file path>] |
/INTERACTIVE
/USER [:<user id>] |
/PASSWORD [:<password id>] |
/? [:<help type>]

<computer id list>

::=

<computer id> | <computer id> <computer id list>

<command >

::=

(<alias> [ <WMI object>] | [<alias>] <path where>) [<verb clause>] |
EXIT |
CLASS [<class path expression >] [<verb clause>] |
RESTORE [ <restore file path>]

<path where>

::=

[PATH (<path expression> | <class path expression> )][ WHERE <where clause>]

<alias>

::=

!! name for the alias. The name will be unique in the context of the namespace in which the alias is defined. Note CLASS, PATH, WHERE, RESTORE and EXIT cannot be used as alias names as they appear in the same location in the syntax.

<WMI object>

::=

<parens> <alias parameters> <parens> | <alias parameters>

<path expression>

::=

!! A WMI path expression including a key clause

<where clause>

::=

!! A WQL where clause optionally surrounded by parenthesis

<class path expression >

 

!! A WMI path expression that does not include a key clause

<alias parameters>

::=

!! one or more space delimited literals that will be used as substitutions in the alias PWhere value.

<verb clause>

::=

(<verb> [<verb parameters>] |
<standard verb>) [<verb switches>]

<verb>

::=

<property name> |
<identifier> |
<method name>

<verb switches>

::=

/INTERACTIVE |
/NOINTERACTIVE

<verb parameter>

::=

<actual parameter> |
<actual parameter> , <verb parameter>

<standard verb>

::=

<get verb> |
<list verb> |
<assoc verb> |
<call verb> |
<create-set verb> |
<delete verb>

<identifier>

::=

<idhead> [<idrest>]

<idhead>

::=

<letter>

<idrest>

::=

<identifier> [<letter> | <digit>]

<get verb>

::=

GET [<property list>] [<get switches>]

<property list>

::=

<property name> |
<property name> , <property list>

<list verb>

::=

LIST [<list format>|<list switches>]

<assoc verb>

::=

ASSOC [<format specifier>]

<call verb>

::=

CALL <method name> [<actual parameter list>]

<actual parameter list>

::=

<actual parameter> |
<actual parameter , <actual parameter list>

<create-set verb>

::=

SET <assign list>| CREATE <assign list>

<assign list>

::=

<property name> = <property value> |
<property name> = <property value> <assign list>

<delete verb>

::=

DELETE

<get switches>

::=

/VALUE |
/ALL |
/TRANSLATE :<table name> |
/EVERY :<interval> |
/FORMAT [:<format specifier>] |
/DESCRIPTION [:<code page>]

<interval>

::=

!! numeric value indicating frequency within which values should be returned

<format specifier>

::=

:<xsl file name> |
:TABLE |
:MOF

<list format>

::=

BRIEF |
INSTANCE |
SYSTEM |
STATUS |
FULL |
<user format>

<list switches>

 

/TRANSLATE |
/EVERY :<interval>|
/FORMAT [:<format specifier>]

<help type>

::=

: BRIEF |
: FULL


Top of pageTop of page