Scripts/Show-ProgressBar.ps1
Function Show-ProgressBar { Param ( [String]$Activity, [Int]$TotalItems, [Int]$Counter, [String]$ProcessItem ) [Int]$PercentComplete = ($Counter / $TotalItems * 100) Write-Progress -Activity $Activity -PercentComplete $PercentComplete -CurrentOperation "$("$Counter of $TotalItems") - $($PercentComplete)$("% Complete.")" -Status "$("Processing host: ")$($ProcessItem)" } |