Skip to content

Instantly share code, notes, and snippets.

@gravcat
Last active April 10, 2019 12:51
Show Gist options
  • Save gravcat/fb08962a977acbcb6d255923e0cb4fab to your computer and use it in GitHub Desktop.
Save gravcat/fb08962a977acbcb6d255923e0cb4fab to your computer and use it in GitHub Desktop.
call script, input filename, receive bacon (or a sha256sum by default)
param (
[String]
$File,
[String]
$Alg = SHA256
)
(Get-FileHash $File -Algorithm $Alg).Hash.ToLower()
@gravcat
Copy link
Author

gravcat commented Apr 9, 2019

i made this because most processes are expecting checksums in lowercase form, at least in my neck of the woods. sha256 by default

usage:

.\Get-Checksum.ps1 -File mycoolfile.exe

output example:

81f8e4ed1046c10b82531567ceba27503f264f1c4ebbee71aaa07c2bee96d59c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment