Forrest logo
back to the Get-FileHash tool

get-filehash:tldr:f44f9

get-filehash: Calculate a hash for a specified file using a specified algorithm.
$ Get-FileHash ${path\to\file} -Algorithm ${select}
try on your machine

The command "Get-FileHash" is a PowerShell cmdlet used to calculate the hash value (checksum) of a file.

Here's the breakdown of the command:

  1. "Get-FileHash" is the name of the cmdlet.
  2. "${path\to\file}" is the path to the file for which you want to calculate the hash value. This is a placeholder, and you need to replace it with the actual file path.
  3. "-Algorithm" is a flag that allows you to specify the algorithm for calculating the hash value. Algorithms available for selection include MD5, SHA1, SHA256, SHA384, and SHA512. "${select}" is a placeholder, and you need to replace it with the desired algorithm.

So, when running the command, you need to provide the path to the file and select the algorithm you want to use. Here's an example of how it should look:

Get-FileHash "C:\path\to\file.txt" -Algorithm SHA256

In this example, we calculate the SHA256 hash value for the file.txt located at "C:\path\to\".

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the Get-FileHash tool