November 5th, 2015

PowerTip: Use PowerShell to Display ASCII Characters

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to display ASCII characters.

Hey, Scripting Guy! Question How can I use Windows PowerShell to quickly display printable ASCII characters when I am not connected
           to the Internet?

Hey, Scripting Guy! Answer Use the range operator to create a range of numbers 1 through 128, pipe it to Foreach-Object (% is the alias),
           and display the current object and the [char] value on the pipeline, for example:

1..128 | %{"$_ $([char]$_)"}

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.