Windows:wmi&wql

Source: Internet
Author: User

wmi:windows Management instrumentation, Windows Management Specifications .

Cim:common information Model, Generic Information Model .

wql:wmi Query Language ,Windows Management Specification Query Language words , is WMI the query language in .


Windows the self-brought WQL Test Tool : WBEMTest


#####################################

WQL The keywords :

SELECT: represents a property that needs to be queried , * represents all Properties .

From : The name of the class that needs to be queried .

WHERE: The conditional statement .

Having:

Like:

is:

and : joins a Boolean expression .

OR: joins a Boolean expression .

Not:

Null:


Associators

_class

Groupclause

Isa

Keysonly

Referencesof

Within

TRUE:

FALSE:


#####################################

from available classes: can be viewed through enum .

select* from Meta_class WHERE __class like "%win32%" # Find all Win32 the instance.

select* from Meta_class WHERE __class like "% CIM %" # query all CIM the instance.


Useful statements:

select* from Win32_LogicalDisk # view Logical Disk.


To view a file under a path:

select* from Cim_datafile WHERE drive= "C:" and Path= "\\path\\" and the FileName like "percent" # view all the files in a folder on C Drive.

The file name inside the percent is not suffixed.


#####################################


Windows:wmi&wql

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.