8 lines
163 B
PowerShell
8 lines
163 B
PowerShell
param([string]$file, [string]$hash);
|
|
|
|
$hashFromFile = Get-FileHash -Path $file -Algorithm SHA256
|
|
|
|
if ($hashFromFile.Hash -ne $hash) {
|
|
Throw 'Hash mismatch!'
|
|
}
|