title: Casting int to chars in Powershell has unexpected results
body: <p>I am trying to generate strings with 1 of every ASCII character. I started with </p>
  
  <pre><code>32..255| %{[char]$_ | Out-File -filepath .\outfile.txt -Encoding ASCII -Append}
  </code></pre>
  
  <p>I expected the <a href="https://www.juniper.net/documentation/en_US/idp5.1/topics/reference/general/intrusion-detection-prevention-custom-attack-object-extended-ascii.html" rel="nofollow noreferrer">list of printable characters</a>, but I got different characters. </p>
  
  <p>Can anyone point me to either a better way to get my expected result or an explanation as to why I'm getting these results?</p>