“$xyz” and “Write-Host ”$xyz“” giving different output
问题 I am hashing all the files in one location, an origin folder, and writing the hashes to a variable and then doing the same to all the files in another location, a destination folder: $origin = Get-ChildItem .\Test1 | Get-FileHash | Format-Table -Property Hash -HideTableHeaders $destination = Get-ChildItem .\Test2 | Get-FileHash | Format-Table -Property Hash -HideTableHeaders Then I am comparing them with Compare-Object like so: Compare-Object $origin $destination Now in my test I purposefully