Win10 PowerShell verifies the MD5/SHA1 signature value of the downloaded package

Source: Internet
Author: User
Tags sha1

Skillfully use Win10 's own PowerShell command to verify the hash value of the file (MD5, sha1/256, etc.)posted on March 8, 2017 by Ms Sheikh

Generally, in order to ensure the integrity and reliability of the files we download from the Internet, we will check the MD5 value or SHA1 value after downloading the file (for example, verifying that the downloaded WIN10 ISO image is the original file), which is usually done with a special MD5 inspection tool. However, you can perform file MD5, SHA1 value checking using Windows PowerShell running commands from Windows system. Here's how:

Right-click on the Win10 Start button and select Windows PowerShell (Administrator) to open the Administrator: Windows PowerShell window.

The command format for verifying the hash value of a file is as follows:

Get-filehash file path-algorithm checksum hash value type | Format-list

PS: If you need to verify the file path is more complex, such as the path contains spaces, parentheses and other special symbols, you need to precede the path with double quotation marks.

The types of hash values that Windows PowerShell commands can verify include: SHA1, SHA256, SHA384, SHA512, MACTripleDES, MD5, RIPEMD160, and the checksum CRC32 value is not supported at this stage.

If you do not have the-algorithm parameter, that is, the hash value type of the validation is not specified, then the default validation is the SHA256 value.

The following Ms Chief for example, to verify the system's Notepad program hash value for example, the path of the program file is C:\Windows\notepad.exe. If we want to verify its MD5 value, run the following command:

Get-filehash C:\Windows\notepad.exe-Algorithm md5| Format-list

If you want to verify its SHA1 value, run the following command:

Get-filehash C:\Windows\notepad.exe-Algorithm sha1| Format-list

If you want to verify the SHA256 value, you do not need to take the-algorithm parameter, the command is as follows:

Get-filehash C:\Windows\notepad.exe | Format-list

Win10 PowerShell verifies the MD5/SHA1 signature value of the downloaded package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.