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.
Examples:
Get-FileHash -Algorithm MD5 .\Windows2016.iso Algorithm Hash Path --------- ---- ---- MD5 80FD169D3FDADBC97E66C168F796B1BF C:\temp\Windows2016.iso
Check official Microsoft page with information about this Powershell cmdlet.
One Reply to “How to get MD5 or SHA checksum using Powershell”