How do I generate file hashes in PowerShell?

Problem:

I am copying some important files and I want to generate some file hashes from the original files that I can match with the copied files

Solution:

Run the below PowerShell code:

Get-FileHash -Algorithm SHA1 -Path (Get-ChildItem "E:\myfiles\*.*" -Recurse -force) | export-csv "C:\temp\hashes.csv"

Leave a Reply

Your email address will not be published. Required fields are marked *