r/PowerShell • • 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 300

I 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

52 comments sorted by

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.

1

u/Sea_Ice6776 Dec 09 '25

Done yesterday.

Feel free to retract the statement...

1

u/PhysicalPinkOrchid Dec 09 '25

He won't... he has a fragile ego.