File Hash Calculator in PowerShell
This File Hash Calculator Script in PowerShell lets you calculate a hash of a given file and compares it with the original hash/checksum the user provides.
The Get-FileHash cmdlet computes the hash value for a file by using a specified hash algorithm. A hash value is a unique value that corresponds to the content of the file. Rather than identifying the contents of a file by its file name, extension, or other designation, a hash assigns a unique value to the contents of a file.
Simply execute the Script and follow the Steps for the hash calculation and verfication by choosing the menu point. You will have to provide a path to the file you want to calculate and you will have to paste the original hash/checksum to compare it. Currently this script supports every method which the cmdlet Get-FileHash supports.
Simply execute the Script in a opened up PowerShell.
After executing the script you will be presented a menu to choose which algorithm you want to calculate.
If you are calculating big files, the Script will show a progress bar, so you know the file is beeing calculated.
The Script will tell you if your file and the provided checksum is valid or not.
Example of a valid hash:
Example of a non valid hash:
The script also checks for a correct user input. If the file doesn’t exist which the user provides, it throws an error message.
Have fun with the File Hash Calculator Script in PowerShell ! I always love feedback, so write a comment or leave me a message on social media.
You can get the Script on my Github Page: File Hash Calculator Script