It isn’t a problem really but you are introducing a slight bias on your selection because of this operation “[char]$char = $choice[$b % $choice.Length] ” (by chance or design only when using symbols).

When using symbols you can choose from a total of 94 characters and you have 256 possible byte values. 256%94=68 and 256/94=4 therefore the first 68 characters in your $choice array have a probability 5/256 of occurring at any given iteration whereas the remaining characters have a probability of 4/256.

I’m not sure but I think the solution would be to ignore any random byte value greater or equal to (256/$choice.length)*$choice.length.

But of course this is nitpicking.