[ACCEPTED]-powershell to get the first x MB of a file-powershell
Get-Content foo.exe -TotalCount 1MB -Encoding byte
If you happen to be using PowerShell Community Extensions then do this:
Format-Hex foo.exe -count 1MB
Note: If 2 you are using PowerShell V2 be sure to grab 1 the 1.2 beta of PSCX.
Independent of PowerShell, I'd just use 3 the
head command. (It's a standard Unix command, but 2 it's available for Windows.) The
-c option lets you specify the number 1 of bytes you want.
head -c 1024 foo.exe
More Related questions