PowerShell – File Hash

Many online file downloads have a checksum in the form of a ‘hash’ code, allowing you to verify the file integrity. This can be useful when downloaded via a 3rd party mirror or to see if a file is corrupted.

There is a handy PowerShell command for this: Get-FileHash

The -Algorithm parameter allows you to get the hash for different algorithms. Use <tab> to cycle through the available options.

Taking a LibreOffice mirror download as an example.

  • Filename: LibreOffice_6.4.5_Win_x64.msi
  • SHA-256 Hash3d80c1d8f3bf4540a6b845d43e54d3e6940058a9b2e5456234ac0fa39527ebcf
  • SHA-1 Hash727e65bfbd50d8a6953687398c62ad8e688256e1
  • MD5 Hashfa9c89d871b1e8d520ae2d488bdbf87d

 

 

 

Leave a Reply

Your email address will not be published.