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"
WQL and arrays
WQL cannot filter array-based properties (for example, the capabilities property of Win32_DiskDrive).
WQL cannot filter array-based properties (for example, the capabilities property of Win32_DiskDrive).