Get-FileHash
Compute file hashes (SHA256, etc.).
Windowspassive
Get-FileHash computes cryptographic hashes of files for integrity checks and IOC matching.
Syntax
Get-FileHash {path} [-Algorithm {alg}]
Example
Get-FileHash .\suspect.exe -Algorithm SHA256
Outputs the SHA-256 hash to compare against threat-intel/IOC feeds.
Options & flags
What each switch does. Toggle them in the builder below to assemble a command.
Command builder
Tick options (and fill any values) to build a ready-to-copy command.
get-filehash
Usage examples
Get-FileHash suspect.exe -Algorithm SHA256
Compute a SHA-256 hash for IOC matching.
Advantages
- Multiple algorithms
- IOC/integrity verification
- Built-in, scriptable
Disadvantages
- Hashing big files is slow
- Windows-only
- No bulk recursion by default
Tags
#windows#hash#integrity
Official docs: Get-FileHash ↗
Related commands
Frequently asked questions
What is Get-FileHash used for?
Get-FileHash computes cryptographic hashes of files for integrity checks and IOC matching.
What is an example Get-FileHash command?
A common example is: Get-FileHash .\suspect.exe -Algorithm SHA256 — Outputs the SHA-256 hash to compare against threat-intel/IOC feeds.
Is Get-FileHash part of a standard install?
Get-FileHash runs on Windows. It is typically available by default.
What category of security tool is Get-FileHash?
Get-FileHash is a PowerShell tool with a passive-risk profile when run against a live target.
Try recon tools live
Run real scans against a domain you control, stage by stage.