Try this (I haven't tested it):
$path1 = "/home/azureadmin/HTML"
$path2 = "/var/www/html"
Get-ChildItem -Path $path1 -File |
ForEach-Object{
$name2 = "{0}\{1}" -f $path2, $_.Name
$hash1 = Get-FileHash -Path $_.FullName -Algorithm SHA256
$hash2 = Get-FileHash -Path $name2 -Algorithm SHA256
if ($hash1 -ne $hash2){
# send email here
}
}
It doesn't cover the case of a file existing in one directory and not in the other. It only uses the file in one directory to compare against a file with the same name in another directory.