February 2019
Intermediate to advanced
626 pages
15h 51m
English
The SELECT, WHERE, and FROM keywords are used with the Query parameter.
The generalized syntax for the Query parameter is as follows:
SELECT <Properties> FROM <WMI Class> SELECT <Properties> FROM <WMI Class> WHERE <Condition>
The wildcard, *, may be used to request all available properties or a list of known properties may be requested:
Get-CimInstance -Query "SELECT * FROM Win32_Process" Get-CimInstance -Query "SELECT ProcessID, CommandLine FROM Win32_Process"
The WHERE keyword is used to filter results returned by SELECT; for example, see the following:
Get-CimInstance -Query "SELECT * FROM Win32_Process WHERE ProcessID=$PID"
Read now
Unlock full access