July 2018
Beginner
552 pages
13h 18m
English
PowerShell can use the typical logical operators most scripting and programming languages use. The following table shows which operators are available in PowerShell:
|
Operator
|
Meaning
|
Description
|
|
-and |
Combines two expressions with AND |
Returns true if both are true. |
|
-or |
Combines two expressions with OR |
Returns true if one or both are true. |
|
-xor |
Combines two expressions with XOR |
Returns true if one of the expressions is true and the other one is false. |
|
-not |
Negate |
Negates the expression. |
|
! |
Negate |
Negates the expression. |
Some examples are as follows:
# Initialization of variables$numericValue = 1.337$stringValue = 'Let make PowerShell great'# combining expressions with ...
Read now
Unlock full access