I needed to get the first 5 bytes of a file using the powershell:
PS D:\> Get-Content "D:\TEST\file.txt" -Encoding byte -TotalCount 5
102
100
115
97
102
But for some files the Get-Content command returns the following error "A parameter cannot be found that matches parameter name 'Encoding'"
PS D:\Scripting\CORRUPT> Get-Content "D:\TEST\file[1].txt" -Encoding byte -TotalCount 5
Get-Content : A parameter
… Read more