sauce

$file="c:\windows\tasks\cmd.aspx"
get-filehash -algorithm sha256 $file
$bytes = [System.IO.File]::ReadAllBytes($file);
$b64str = [System.Convert]::ToBase64String($bytes);
$b64str