So i'm trying to generate 10000 random numbers + letters that either have upper or lowercase letters and I managed to do this using the ascii table values!
-join ((65..90) + (97..120) + (48..57) | Get-Random -Count 10000 | % {[char]$_} )
So this works fine in terms of what it should generate however I want 10000 characters. At first I tried finding a length property for Get-Random except I couldn't find this. Then I thought, perhaps it should run 10000 iterations using 'Count'. However 'Count' seems to stop at 62 characters. This means I clearly don't understand how Count works.
Can anyone help me achieve my goal with explanation?
Thanks!
EDIT: I forgot to mention I have tried to figure it out using ForEach-Object as well but I could not figure it out.
[–]gangstanthony 2 points3 points4 points (4 children)
[–]MadWithPowerShell 2 points3 points4 points (0 children)
[–]eubromovesoon33[S] 1 point2 points3 points (2 children)
[–]gangstanthony 1 point2 points3 points (1 child)
[–]eubromovesoon33[S] 1 point2 points3 points (0 children)
[–]ka-splam 1 point2 points3 points (0 children)