r/PowerShell • u/DiskBytes • Dec 07 '25
Question sha256 with Powershell - comparing all files
Hello, if I use
Get-ChildItem "." -File -Recurse -Name | Foreach-Object { Get-FileHash -Path $($_) -Algorithm SHA256 } | Format-Table -AutoSize | Out-File -FilePath sha256.txt -Width 300I can get the checksums of all files in a folder and have them saved to a text file. I've been playing around with it, but I can't seem to find a way where I could automate the process of then verifying the checksums of all of those files again, against the checksums saved in the text file. Wondering if anyone can give me some pointers, thanks.
13
Upvotes
View all comments
Show parent comment
3
u/arpan3t Dec 08 '25
That’s great, now do MD5 because that’s what I suggested, not SHA1. You actually just made up an argument and are… arguing with yourself.