PowerShell Unitary Operators

Powershell include powerfull math operators

$x= 100

++ = add 1 to your variable. Ex:  $x++  = 101

— = substract 1 to your variable.  Ex.  $x– = 100

+= adds the value to value to the variable.  Ex.  $x += 10   = 110

*= multiply the value of the variable times the specified value. Ex. $x *= 10  = 1010

/= devide the value of the variable by the value specified. Ex $x /= 10  = 101

Concatenation

You can use the += to concatenate strings.

$a = “Hello”

$a += ” World”

Subscribe For Latest Updates

Sign up for best of digital marketing, livestream and technology opinions on what matters to you.

Invalid email address
We promise not to spam you. You can unsubscribe at any time.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: