get-filehash
Calculate cryptographic checksums for a file. tldr-pages
On Windows
Windows
Calculate cryptographic checksums for a file. Note: This command can only be used through PowerShell.
Calculate the SHA256 checksum for a file
Get-FileHash path\to\fileIdentifyCalculate the checksum for a file using a specified algorithm
Get-FileHash path\to\file -Algorithm SHA1IdentifyCalculate the checksum for a file using a deprecated algorithm (no longer available in PowerShell 6 or later)
Get-FileHash path\to\file -Algorithm MACTripleDESIdentifyCheck a known checksum of a file
(Get-FileHash path\to\file -Algorithm SHA1).Hash -eq "known_hash"