Created
May 22, 2019 16:35
-
-
Save lukecamilo/a711bc1247650c84040e0b4df6b5a2b7 to your computer and use it in GitHub Desktop.
Muestra una barrita de progreso con parametros configurables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show-progressbar([int]$actual,[int]$completo,[string]$status,[string]$Activity) | |
{ | |
$porcentaje=($actual/$completo)*100 | |
# Si no le pasamos un parametro $Status, pone uno generico | |
if (!$status){ | |
$status="Buscando datos $actual de $completo" | |
} | |
# Si no le pasamos un parametro $Activity, pone uno generico | |
if (!$Activity){ | |
$Activity="Obteniendo Resultados" | |
} | |
Write-Progress -Activity $Activity -status $status -percentComplete $porcentaje | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment