Skip to content

Instantly share code, notes, and snippets.

@DeviousMalcontent
Last active December 31, 2022 03:40
Show Gist options
  • Save DeviousMalcontent/57d4910de5b9043a463b0ad00a25348b to your computer and use it in GitHub Desktop.
Save DeviousMalcontent/57d4910de5b9043a463b0ad00a25348b to your computer and use it in GitHub Desktop.
A PowerShell One-liner, to print an ASCII Code chart in the console.
#PowerShell One-liner, print ASCII Code chart:
$ExcludedChars = 0,7,8,9,10,13,27,155; for($i=0; $i -le 255; $i++){Write-Host "Char:" $(if ($ExcludedChars -contains $i) {([char]32)} else {([char]$i)})"Dec:"$i" Hex:"('{0:X}' -f $i)"Bin:"([convert]::ToString($i,2))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment