Comparison operators may be used with the Filter and Query parameters.
The examples in the following table are based on the following command:
Get-CimInstance Win32_Process -Filter "<Filter>"
Description |
Operator |
Example |
Equal to |
= |
Name='powershell.exe' AND ProcessId=0 |
Not equal to |
<> |
Name<>'powershell.exe' |
Greater than |
> |
WorkingSetSize>$(100MB) |
Greater than or equal to |
>= |
WorkingSetSize>=$(100MB) |
Less than |
< |
WorkingSetSize<$(100MB) |
Less than or equal to |
<= |
WorkingSetSize<=$(100MB) |
Is |
IS |
CommandLine IS NULL CommandLine IS NOT NULL |
Like |
LIKE |
CommandLine LIKE '%.exe' |