I'm trying to write an unsigned integer (its 4-byte DWORD binary representation) to a file with PowerShell, but all the alternatives I've tried only write text.
Let's say I have this number:
$number = [Int] 255
The file content should be FF000000
(binary), not 255
(text).
I'm not a PowerShell expert, so I appreciate any help.
Found a solution: