Logic 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 | Syntax | Example |
Logical and | AND | <Condition1> AND <Condition2> | ProcessID=$pid AND Name='powershell.exe' |
Logical or | OR | <Condition1> OR <Condition2> | ProcessID=$pid OR ProcessID=0 |
Logical not | NOT | NOT <Condition> | NOT ProcessID=$pid |