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.
- Download the file in question i.e. VirtualBox for example
- Once downloaded, open Powershell and input the following command;
Get-FileHash -Path E:\Downloads -algorithm SHA256
- Powershell will then output the SHA256 value (or MD5 if preferred)
- Obtain the checksum from said website and manually check each character in the string and decide if it matches or not!
- Type the following instead;
- (Get-FileHash C:\Users\qwerrtyuiop\Downloads\YourfFileName.txt -A SHA256).hash -eq “FileCheckSumValueHere“
- 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
- 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
- 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!