11-18-2022, 08:57 PM
Code: (Select All)
# Get the file hashes
$hashSrc = Get-FileHash $file -Algorithm "SHA256"
$hashDest = Get-FileHash $file2 -Algorithm "SHA256"
# Compare the hashes & note this in the log
If ($hashSrc.Hash -ne $hashDest.Hash)
{
Add-Content -Path $cLogFile -Value " Source File Hash: $hashSrc does not
equal Existing Destination File Hash: $hashDest the files are NOT EQUAL."
}
Tread on those who tread on you