Terminal Dojo
Help العربية Sign inGet started

Command library / Get-FileHash

Get-FileHash

PowerShellDraft — pending expert review3 practice missions

Compute a file's cryptographic hash

Calculates a file's hash, SHA256 by default, so you can check that a download matches its published checksum, or record evidence and later prove it hasn't changed. Changing even one bit of the file produces a completely different hash.

Practice Get-FileHash

Usage

Get-FileHash [-Path] <string> [-Algorithm <SHA256|SHA384|SHA512|SHA1|MD5>]

Options and flags

Examples

Common mistakes

Get-FileHash tools.zip -Algorithm SHA-512 Get-FileHash tools.zip -Algorithm SHA512

The algorithm names have no hyphen: SHA256, SHA512 and so on.

Related commands

get-childitemget-contentsha256sum