CertUtil -hashfile $FILE_PATH $ALGORITHM

The algorithm can be excluded (in which case SHA1 is used).