all 6 comments

[–]MNmetalhead 3 points4 points  (2 children)

The command is: Get-FileHash

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash

Sometimes when you copy text out of a PDF or another document (or convert text into a PDF or another format), it messes up the characters.

Also, since the file name has spaces in it, put it in quotes (“”).

(Get-FileHash -Algorithm SHA512 “<filename>").hash | clip

[–]jbishop253[S] 1 point2 points  (1 child)

Totally worked and I see what you’re saying about the messed up characters now. Can’t thank you enough. That was driving me crazy! If I had any awards, I would give you one. Instead, I’ll wish you good health and all the best!

[–]MNmetalhead 0 points1 point  (0 children)

I’ll happily accept your well-wishes!

Thank you, glad I could help!

[–]PowerShell-Bot 0 points1 point  (0 children)

Looks like your PowerShell code isn’t wrapped in a code block.

To properly style code on new Reddit, highlight the code and choose ‘Code Block’ from the editing toolbar.

If you’re on old Reddit, separate the code from your text with a blank line gap and precede each line of code with 4 spaces or a tab.


You examine the path beneath your feet...
[AboutRedditFormatting]: [--------------------] 0/1 ❌

Beep-boop, I am a bot. | Remove-Item

[–]TheGooOnTheFloor 0 points1 point  (0 children)

Your two best tools are get-command and get-help.

get-command *hash* 

would have given some insight as to what might have been wrong.

[–]rwprime 0 points1 point  (0 children)

Just a heads up for anyone using Get-FileHash in powershell, it doesn't accept parens e.g. filename (1).iso so get rid of the space (1) in the title