The following two commands using the Get-FileHash cmdlet seem to give the same result (md5 hashes for all files in a directory and its subdirectories). I was wondering if there is any difference between piping in the list of file paths and using round brackets to the Get-FileHash cmdlet aside from the number of characters?
Get-FileHash -Algorithm MD5 -Path (Get-ChildItem "*.*" -Recurse)
Get-ChildItem "*.*" -Recurse | Get-FileHash -Algorithm MD5
Also, I tried timing the commands with Measure-Command a dozen times or so (based on this question Timing a command's execution in PowerShell; I don't know of a more statistically significant approach in PowerShell) -- on the same small directory on my system, the round bracket version often takes 8 to 9 milliseconds and the piped version takes 9 to 10 milliseconds.
Measure-Command { Get-FileHash -Algorithm MD5 -Path (Get-ChildItem "*.*" -Recurse) }
Measure-Command { Get-ChildItem "*.*" -Recurse | Get-FileHash -Algorithm MD5 }