To test whether "C:\Users\mike\myfile.txt" and "F:\myfolder\myfile.txt" are the same...
return (Get-Filehash "C:\Users\mike\myfile.txt") -eq (Get-Filehash "F:\myfolder\myfile.txt")
This will return "True" if content of the files is exactly the same.You can also test for inequality...
return (Get-Filehash "C:\Users\mike\myfile.txt") -ne (Get-Filehash "F:\myfolder\myfile.txt")
This will return "False" if content of the files is exactly the same.To just see the hash value of a file, without comparing it, use:
Get-Filehash "C:\Users\mike\myfile.txt")
To see differences in file content you could use something like this...
Compare-Object (Get-Content "C:\Users\mike\myfile.txt") (Get-Content "F:\myfolder\myfile.txt")