Welcome to MSDN Blogs Sign in | Join | Help

get-SHA256

Get the SHA256 hash in one line of powershell:

function get-sha256 {
param($file);[system.bitconverter]::tostring([System.Security.Cryptography.sha256]::create().computehash([system.io.file]::openread((resolve-path $file)))) -replace "-",""
}

Published Wednesday, March 14, 2007 8:10 PM by mwilbur

Comments

Thursday, March 15, 2007 3:44 AM by James Manning's blog

# get-hashes.ps1: Get the hashes (sha256, md5, whatever) for a file

A slight modification of Mike's version , since sometimes I want md5, sometimes sha1, whatever, and I

Anonymous comments are disabled
 
Page view tracker