Powershell functions that convert bytes to hex and hex to bytes.
Powershell functions that also convert ascii to hex and hex to ascii
PS C:\Users\chris\Desktop\Testing> Convert-AsciiToHex "Hello World"
48656C6C6F20576F726C64
PS C:\Users\chris\Desktop\Testing> $bytes = Convert-HexToBytes 48656C6C6F20576F726C64
PS C:\Users\chris\Desktop\Testing> $bytes
72
101
108
108
111
32
87
111
114
108
100
PS C:\Users\chris\Desktop\Testing> Convert-BytesToHEX $bytes
48656c6c6f20576f726c64
PS C:\Users\chris\Desktop\Testing> Convert-HexToAscii 48656c6c6f20576f726c64
Hello World
$enc = [system.Text.Encoding]::UTF8
$hw = "Hello World"
$bytes = $enc.GetBytes($hw)
$enc = [system.Text.Encoding]::UTF8
$helloworld = $enc.GetString($bytes)
$helloworld
Hello World