Project

General

Profile

Actions

Todo #13452

open

Add a one line command for Windows Command Prompt to return an installer's SHA256 checksum

Added by Chris W 3 months ago. Updated 3 months ago.

Status:
Pull Request Review
Priority:
Normal
Assignee:
-
Category:
Installation / Upgrades
Target version:
-
Start date:
Due date:
% Done:

80%

Estimated time:

Description

Currently we link to the Github page of OpenHashTab, which of course is an .exe which must be downloaded and installed. The certutil command is already built into Windows:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil

Example output:

C:\Users\user\Downloads>certutil -hashfile pfSense-plus-memstick-serial-22.05-RELEASE-amd64.img.gz sha256
SHA256 hash of pfSense-plus-memstick-serial-22.05-RELEASE-amd64.img.gz:
f14558ad85a8a38aea04c0e5989ea0099119fbaa94872fd54e8d69fbec7b2587
CertUtil: -hashfile command completed successfully
Actions #2

Updated by Chris W 3 months ago

  • % Done changed from 0 to 80
Actions #3

Updated by e 1/1 3 months ago

It'd be nice to have the PowerShell way listed as well, now that this shell is becoming essential in managing Windows based systems, plus others.

Get-FileHash -Algorithm SHA256 [-Path] {path to image}

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash

PS /home/user> Get-FileHash -Algorithm SHA256 -Path /home/user/Downloads/pfSense-CE-2.6.0-RELEASE-amd64.iso.gz

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA256          941A68C7F20C4B635447CCEDA429A027F816BDB78D54B8252BB87ABF1FC22EE3       /home/user/Downloads/pfSense-CE-2.6.0-RELEASE-amd64.iso.gz

Actions #4

Updated by Jim Pingle 3 months ago

PowerShell is definitely the way to go for this. Any supported version of Windows is going to have that available. No reason to prefer cmd prompt methods these days.

Actions #5

Updated by Chris W 3 months ago

Changed from CMD to PS.

Actions #6

Updated by Chris W 3 months ago

  • Status changed from New to Pull Request Review
Actions

Also available in: Atom PDF