How to get MD5 or SHA checksum using Powershell

Often I need to calculate an MD5 checksum of a file downloaded from Internet. I’m using Powershell command to do it.

How to get file checksum using Powershell

I’m using cmdlet presented in Powershell version 4: Get-FileHash with parameter -Algorithm. This parameter allows to use below algorithms: 

  • SHA1
  • SHA256
  • SHA384
  • SHA512
  • MD5

Default value is SHA256.


Get-FileHash -Algorithm MD5 .\Windows2016.iso

Algorithm       Hash                                                                   Path                                                                              
---------       ----                                                                   ----                                                                              
MD5             80FD169D3FDADBC97E66C168F796B1BF                                       C:\temp\Windows2016.iso     

File checksum with Powershell MD5 SHA512

Check official Microsoft page with information about this Powershell cmdlet.

One Reply to “How to get MD5 or SHA checksum using Powershell”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.