Search notes:
PowerShell cmdLet Format-Hex
PS C:\> 'René' | format-hex
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 52 65 6E 3F Ren?
PS C:\> [System.Text.Encoding]::UTF8.GetBytes('René') | format-hex
Path:
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 52 65 6E C3 A9 René
The content of a file can be displayed by specifing the -path
parameter with the name of a file:
PS C:\> format-hex -path readme.txt
See also
A number might also be displayed in hexadecimal representation using the
-f
operator and the
{…:x
] format specifier:
PS C:\> $num = 257
PS C:\> '{0:x}' -f $num
101
The (Linux) shell command
od