Perform Simple Arithmetic in Windows PowerShell
Problem
You want to use PowerShell to calculate simple mathematical results.
Solution
Use PowerShell’s arithmetic operators:
+
Addition
-
Subtraction
*
Multiplication
/
Division
%
Modulus
+=, -=, *=, /=, and %= Assignment variations of the above ( ) Precedence/Order of operations
Discussion
- Read more about Perform Simple Arithmetic in Windows PowerShell
- Log in or register to post comments