I am trying to create a PS script that compares the hash of a file after download to ensure integrity. I want to make it user friendly, something I can stick in our RMM tool set so lower tier technicians can utilize it. I originally wanted to create variables like:
$1 = SHA1
$2 = SHA256
$3 = SHA384
$4 = SHA512
$5 = MD5
but I get the following message:
The term ‘SHA1’ is not recognized as the name of a cmdlet, function,
| script file, or operable program. Check the spelling of the name, or
| if a path was included, verify that the path is correct and try again.
When I try the variable as a string
- User is prompted for a value 1-5, each representing an Algorithm
- User provides file path
- User inserts hash comparison
- User is presented with a Boolean value stating if there is a match or not
I am an aspiring DevOps IT, I am admittedly new to robust scripting but I catch on quick. I have some experience programming with full stack environments. Any advise would be greatly appreciated.