Hash Files With Get-FileHash
Compute SHA-256 or other hashes as objects for comparison.
01Command
$ Get-FileHash .\installer.exe -Algorithm SHA25602What it does
Get-FileHash returns a hash object, so verifying a download against a published checksum is a simple comparison in a script, and it works across platforms. Comparing manually character by character is exactly the kind of task worth automating.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-FileHashEvidence: Computes hashes of files using a chosen algorithm.
Last verified: 2026-10-13 · Category: Security & Privacy
06Related solutions
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.
Windows' built-in tool for overwriting freed disk clusters so previously deleted files can't be recovered — no third-party shredder needed.