Search code examples
powershellmathexponentexponentiation

How do I raise X to the power of Y in Powershell?


I (apparently wrongly) assumed there would be a built-in power operator or function in Powershell, but I it seems there is not, or is there?


Solution

  • Never mind, I found the answer:

    [Math]::Pow(256,3) # 256 to the power of 3 (= ~16.7 million)