Query.vbs Syntax
Open command prompt now.
Query.Vbs [/S:server] [/N:namespace] [/P:property1[:width1] [/P:property2[:width2]]...] [/D:width] /FROM:class [/WHERE:criteria] [/SORT:A | D[:num] | N] [/O:outputfile] [/U:username] [/W:password] [/F]
Query.Vbs [/S:server] [/N:namespace] /FROM:class [/O:outputfile] [/U:username] [/W:password] [/P]
Where:
- server
- is a computer name.
- namespace
- is a namespace string.
- property1, property2, à
- are the properties to be retrieved.
- width1, width2, à
- are the widths of columns used to display values of the corresponding properties.
- width
- is the default width of each column. The default value is 15.
- class
- is the name of a WMI class.
- criteria
- is the criteria of the search.
- A | D | N
- sorts a column ascending, descending or does no sorting.
- num
- is the column number of the column to be sorted.
- outputfile
- is the output file name.
- username and password
- are the user name and password of the current user.
- /P
- lists the names of all properties of a process.
- /F
- uses flush output.