Skip to content

Instantly share code, notes, and snippets.

@dpeterka
Created June 22, 2022 21:04
Show Gist options
  • Save dpeterka/5cafe53f08119ab9b3a5c12c88969caf to your computer and use it in GitHub Desktop.
Save dpeterka/5cafe53f08119ab9b3a5c12c88969caf to your computer and use it in GitHub Desktop.
$hashstore = "C:\VMWare\Guests\ThirdWaveRx\Intune\hash-1.csv"
Import-CSV -Path $hashstore | ForEach-Object {
$fname = (Get-Item $_.Path).Name
$hash = $_.Hash
$dstpath = "C:\VMWare\Guests\ThirdWaveRx\thirdwaverx_vmware\" + $fname
$dsthash = (Get-FileHash -Algorithm "SHA256" $dstPath).Hash
if ($dsthash -ne $hash) {
Write-Output "Failed"
Exit 1
}
}
Write-Output "Success"
Exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment