$p = $ExecutionContext.SessionState.Path
$path = $p.GetUnresolvedProviderPathFromPSPath("<%= path %>")

if (Test-Path $path -PathType Leaf) {
  $cryptoProv = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
  $file = [System.IO.File]::Open($path,
      [System.IO.Filemode]::Open, [System.IO.FileAccess]::Read)
  $md5 = ([System.BitConverter]::ToString($cryptoProv.ComputeHash($file)))
  $md5 = $md5.Replace("-","").ToLower()
  $file.Close()

  Write-Output $md5
}
