kjacobsen icon

get-filehashvalidating

kjacobsen | PRO | 02/09/13 10:34:28 AM UTC | 0 ⭐ | 515 👁️ | Never ⏰ | []
PowerShell |

450 B

|

None

|

0 👍

/

0 👎

# 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

Comments