Created
April 20, 2024 21:19
-
-
Save Julienraptor01/111485388563739789ffd37b71681590 to your computer and use it in GitHub Desktop.
simple powershell script to get hashes in a similar format to 7z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (Get-Item (Read-Host "Enter the file name")) | % { "Name: $($_.Name)`nSize: $($_.Length) bytes ($([math]::Truncate($_.Length / 1MB)) MiB)`nSHA256: $((Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash.ToLower())`nSHA1: $((Get-FileHash -Path $_.FullName -Algorithm SHA1).Hash.ToLower())" | Tee-Object -Variable output | Set-Clipboard; Write-Output $output } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment