Databases Reference
In-Depth Information
Operators
Any programming language generally supports numeric operators similar to mathematical operators.
In addition to the numeric operators, PowerShell also supports other operators. The following tables
describe the operators available in PowerShell.
Numeric Assignment
Operator
Description
=
Assigns a value to a variable
+=
Adds the value of the right side of the assignment to the existing value
of the left side and assigns the result to the variable on the left side
−=
Subtracts the value of the right side of the assignment from the existing
value of the left side and assigns the result to the variable on the left
side
* =
Multiplies the value of the right side of the assignment and the existing
value of the left side and assigns the result to the variable on the left
side
/ =
Divides the value of the left side of the assignment into the existing
value of the right side and assigns the result to the variable on the left
side
% =
Divides the value of the left side of the assignment into the existing
value of the right side and assigns the remainder to the variable on the
left side
Logical Operator
Description
-and
Is true if both comparisons are true and only then
-or
Is true if one or both comparisons is true
-not
Negation
!
Negation. Synonym for -not .
Unary Operator
Description
Signifies explicitly that a number is a positive number
+
Signifies that a number is a negative number
Increments a value or variable
++
Decrements a value or variable
Search WWH ::




Custom Search