Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # code from http://aperturescience.su
- Function Get-FileHash
- {
- [CMDLetBinding()]
- param
- (
- [Parameter(mandatory=$true, valuefrompipeline=$true)] [ValidateScript({Test-Path $_ -PathType 'lea'})] [String] $File,
- [ValidateSet("sha1", "sha256", "sha384", "sha512", "md5", "ripemd160")] $HashAlgorithm = "sha256",
- [switch] $Group
- )
- Process
- {
- #variable to store hash of the file
- $hash
- # code from http://aperturescience.su
Advertisement
Add Comment
Please, Sign In to add comment