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?
As you've found, real exponentation can be achieved with some accuracy by calling [Math]::Pow().
For large integer exponentiation, you might want to use [bigint]::Pow() instead:
PS ~> [Math]::Pow(256, 20)
1.4615016373309E+48
PS ~> [bigint]::Pow(256, 20)
1461501637330902918203684832716283019655932542976
Never mind, I found the answer:
[Math]::Pow(256,3) # 256 to the power of 3 (= ~16.7 million)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With