Created
March 4, 2020 08:26
-
-
Save itsho/5d6ee41f1c3b6283b464f9d5af0a8150 to your computer and use it in GitHub Desktop.
Create missing SHA256-hash-file for NuGet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 4.0 | |
[cmdletbinding()] | |
Param([Parameter(Position=0,ValueFromPipeline,ValueFromPipelineByPropertyName)] | |
[string]$Path ) | |
Process { | |
Write-verbose "Creating hash for input file..." | |
$hash = (Get-FileHash -Path $Path -Algorithm "SHA256").Hash | |
#write hash to file | |
$hash > "$Path.sha256" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment