February 2019
Intermediate to advanced
626 pages
15h 51m
English
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 |
Read now
Unlock full access