I have a problem in my script:
here I set a var remotefilehash:
$remotefilehash = $remotefiles -replace '^[a-f0-9]{32}( )', '$0= ' | ConvertFrom-StringData
this creates a hashtable
I then compare those hash's to what I have locally in a hashset
# Create a hash set from the local hashes.
$localHashSet = [System.Collections.Generic.HashSet[string]] $localmd5
# Loop over all remote hashes to find those not among the local hashes.
$diffmd5 = $remotefilehash.Keys.Where({ -not $localHashSet.Contains($_) })
this gets me the hashkeys but I subsequently also need to get the hash values for those keys that are found in the above where ...