How can I remove spaces from this PowerShell array?
问题 I'm trying to get all ASCII numbers and letters from Powershell for use as a key later on. My code so far looks like this: [char[]] $keyArray = @() for($i = 65;$i -le 122;$i++) { if($i -lt 91 -or $i -gt 96) { $keyArray += [char]$i } } for($i = 0; $i -le 9; $i++) { $keyArray += ("$i") } Write-Host [string]$keyArray However, when I write this out (last line), I get the following with spaces in between each character: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m