Skip to content

Instantly share code, notes, and snippets.

@lukecamilo
Created May 22, 2019 16:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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