powershell b64 encode file (+ sha256) May 30, 2022 [ pt ] sauce $file="c:\windows\tasks\cmd.aspx" get-filehash -algorithm sha256 $file $bytes = [System.IO.File]::ReadAllBytes($file); $b64str = [System.Convert]::ToBase64String($bytes); $b64str