A hash value is basically like a "fingerprint" of a file.
However, this fingerprint is very precise,Data inside the fileTherefore, even a single different character in the file, or even a small, invisible change to the data, will result in a completely different hash value.
Hash values are often used to verify the identity of a file. For example, on this site,Homemade softwareIf the hash value of the software we distribute matches the hash value of the software downloaded by the user, we can be sure that the file is genuine. If they do not match, the following problems may be present:
- The file version is different
- The file was corrupted during download
- A third party has installed a virus or tampered with the data.
This page shows you how to get hash values using Command Prompt and PowerShell.
1. How to get the hash value using the command prompt
To get the hash value, use the commandcertutil"Use the.
There are five hash algorithms available:
- MD2
- MD4
- MD5
- SHA1
- SHA256
- SHA384
- SHA512
How to write the command:
%systemroot%\System32\certutil.exe -hashfile "ファイルのフルパス" SHA256
*Please change the "SHA256" part to the algorithm you want to obtain.
If the file name you specify contains spaces, enclose it in double quotation marks ("").
Algorithm: Example of specifying SHA256
%systemroot%\System32\certutil.exe -hashfile "C:\Program Files\Google\Chrome\Application\chrome.exe" SHA256
Let's open a command prompt and run it.
Enter the command and press Enter to display the hash value.
2. How to get the hash value in PowerShell
To get the hash value, use the commandGet-FileHash"Use the.
There are five hash algorithms available:
- MD5
- SHA1
- SHA256
- SHA384
- SHA512
How to write the command:
Get-FileHash "ファイルのフルパス" -Algorithm SHA256 | Format-List
*Please change the "SHA256" part to the algorithm you want to obtain.
If the file name you specify contains spaces, enclose it in double quotation marks ("").
Algorithm: Example of specifying SHA256
1.Start buttonRight-click > Terminal or Windows PowerShell.
2. Type the following command and press Enter:
Get-FileHash "C:\Users\test\Downloads\Win11_24H2_Japanese_x64.iso" -Algorithm SHA256 | Format-List
This will display the hash value.






Comment: