Ejercicio anterior: https://www.jesusninoc.com/12/22/ejercicios-de-powershell-calcular-el-hash-sha256-de-todos-los-procesos-que-se-estan-ejecutando/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
function hasheo { param ( [Parameter(Mandatory=$true, ValueFromPipeline=$true)] [String[]] [AllowEmptyString()] $ruta ) begin { Write-Host "Principio de hasheo" } process { Get-FileHash $ruta } end { Write-Host "Final de hash" } } Get-Process | select Path | %{ hashear $_.Path } |