34,333
edits
Changes
→Division, Subtraction and Modulus Operators
=== Division, Subtraction and Modulus Operators ===
Unlike the above operators, the Windows PowerShell divide, subtract and modulus operators are designed only to work with numbernumbers. It is not, therefore, possible to divide one string by another or subtract two arrays. In terms of performing conversions, as long as one operand is a number, PowerShell will attempt convert the remaining operand to a number (assumingonce again, of course, that it is not already a number). For example, the following expressions all produce the same result:
<pre>