Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Muestra una barrita de progreso con parametros configurables
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