get-filehash <filename>
To use a different algorithm, e.g. MD5: get-filehash -Algorithm MD5 <filename>.
get-filehash -Algorithm MD5 <filename>
shasum -a 256 <filename>
sha256sum <filename>
For MD5 use md5sum <filename>.
md5sum <filename>