But not everybody is nuts about regexes, and the Invoke-NaSsh cmdlet doesn't work if you are using RPC. So the second method makes use of the fact that the "-x" hex representation is just the characters converted to ASCII hex. You can do the whole conversion in one line:
Then you can put that function in the top of your script. Or if it's something you want to use from the commandline everyday, you can put it in your PS profile (the path is in the $profile variable) and then restart PowerShell.