Creating a file hash with PowerShell

It is very easy to create a hash value from a file using PowerShell.

With a single line command you can create this.


  1. Open PowerShell and navigate to the directory containing your file(s).
  2. Type in: Get-FileHash -Alogirthm SHA256 .\myfile.txt
    This will calculate the SHA256 hash value from the myfile.txt file.

Note: it is possible to use another hashing algorithm, like SHA1, SHA384, ...

See also