I know this is old but putting this here because I had the same question and the response marked as the answer needed to be slightly modified.
Get-FileHash -Path "C:\path\to\your\file.ext" -Algorithm SHA256