LANCommander/LANCommander.Server/Snippets/Functions/ConvertTo-StringBytes.ps1

2 lines
195 B
PowerShell
Raw Permalink Normal View History

2023-11-17 00:46:05 -06:00
# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$bytes = ConvertTo-StringBytes -Input "Hello World!" -Utf16 1 -MaxLength 12