Skip to content

Instantly share code, notes, and snippets.

@packmad
Created September 15, 2020 15:27
Show Gist options
  • Save packmad/a33f010bb4b43ec86845b575d6e627fa to your computer and use it in GitHub Desktop.
Save packmad/a33f010bb4b43ec86845b575d6e627fa to your computer and use it in GitHub Desktop.
PS script which writes all exe sha256 hashes of Steam games to a txt file
$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition
$outputTxtFile = Join-Path -Path $scriptPath -ChildPath "hashes.txt"
Get-ChildItem -Path "C:\Program Files (x86)\Steam\steamapps\common" -recurse -include *.exe | foreach-object {
(Get-FileHash $_.FullName -Algorithm SHA256).Hash | Out-File -Encoding Ascii -append $outputTxtFile
}
Write-Host ("Results written in: {0}" -f $outputTxtFile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment