Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Get Hash in Powershell Via Right Click Context Menu

Save this as a .reg file and then double click it to import.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\shell\gethash]
@="Get SHA256 Hash"

[HKEY_CURRENT_USER\Software\Classes\*\shell\gethash\command]
@="powershell -NoProfile -NoExit -Command \"try { Get-FileHash -LiteralPath \\\"%1\\\" -Algorithm SHA256 | ForEach-Object { $_.Hash } | Set-Clipboard; Write-Host 'SHA256 hash copied to clipboard for file: %1' -ForegroundColor Green } catch { Write-Host 'Error:' $_.Exception.Message -ForegroundColor Red }\""
Last updated on 12 Feb 2020
Published on 12 Feb 2020