Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Multiply Value in Variable and Store Results

$
0
0

Summary: Use Windows PowerShell to multiply the value stored in a variable and store the results.

Hey, Scripting Guy! Question How can I use Windows PowerShell to multiply the value of a variable and store the results in the same variable?

Hey, Scripting Guy! Answer Use the *= operator, for example:

PS C:\> $a = 2

PS C:\> $a *= 3

PS C:\> $a

6


Viewing all articles
Browse latest Browse all 3333

Trending Articles