Easiest way to compare a file hash and checksum

#FileCheckSums #Sha256 #CompareCheckSums

We should be checking file integrity as oftne as possible. Doing so helps us reassure ourselves we have the exact copy that we wanted without any compromise or corruption.

The common method is to generate a file hash and compare it manually which can be long winded and not as accurate, or following a over complicated way such as using Powershell ISE – this all results in being put off checking the file hash which is not ideal.

Manual Version

  1. Download the file in question i.e. VirtualBox for example
  2. Once downloaded, open Powershell and input the following command; Get-FileHash -Path E:\Downloads -algorithm SHA256
  3. Powershell will then output the SHA256 value (or MD5 if preferred)
  4. Obtain the checksum from said website and manually check each character in the string and decide if it matches or not!

Easier way

  1. Type the following instead;
  2. (Get-FileHash C:\Users\qwerrtyuiop\Downloads\YourfFileName.txt -A SHA256).hash -eq “FileCheckSumValueHere
  3. Simply replace the 2 fields above with your File location and name. TIP: easiest way is to drag and drop the file from the relevant folder striaght into Powershell and copy & paste the checksum from the website you downloaded the file from i.e. VirtualBox
  4. Once this command complete, press Enter and a Boolean value of True or False will output – this tells us if the file hash and checksum match = True or they don’t = False
  5. Now that is much easier, quicker and more accurate than other common methods. I’ve created a video if you prefer to watch this guide instead!