Calculating or verifying the hash of a file should be a common task to ensure file integrity - e.g. a file you just downloaded over a http connection. Unfortunately, there is no well-known tool under Windows to perform such a task, and most forums suggest writing their own PowerShell script, C# program or download further third party tools.

I recently stumbled across a little known but powerful tool shipped by Windows (at least since Windows 7, probably since Vista), which performs exactly this task: certutil:

certutil -hashfile <file> [MD5|SHA1|SHA256|SHA512]

Usage example – compute the SHA512 hash of a given file

C:\temp>certutil -hashfile iso_dl_over_http.iso SHA512
Hachage SHA512 du fichier iso_dl_over_http.iso :
f7 fe 44 29 17 9b dd 4c d3 01 77 ce 66 39 60 f1 53 bb 5d dd 8d 22 7b ef b6 69 29
28 16 38 ff bb a6 58 57 b4 b4 3a 60 65 dc 96 23 8a 2a 0a 9e 5f ca c4 fe 40 ec 9
8 74 05 f9 95 6f 78 bd 7f 7e 15
CertUtil: -hashfile La commande s'est terminée correctement.