This seems to work. But I didn't wait for it to finish. 6 million with measure-command took 29 seconds.
measure-command { for($i = 0; $i -le 6000000; $i++) { $i } }
Seconds : 29
Maybe 3 days for 60 billion loops?
$LargeNumber = 60000000000
for($i = 0; $i -le $largenumber; $i++) { $i }
It's probably not practical to create a 60 billion array of 8 byte integers with the range operator (450 gigs?). Watch Powershell's Working Set memory go up to 259.61 megs with 1..6million. I almost crashed my computer with higher amounts. I'm on a mac with ps 6.
get-process pwsh
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
0 0.00 77.98 3,212.20 39615 …02 pwsh
$a = 1..6000000
get-process pwsh
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
0 0.00 259.61 3,275.24 39615 …02 pwsh
forloop would work better? Something likefor ($i = 1; $i -le $LargeNumber; $i++)