Skip to content

Instantly share code, notes, and snippets.

View pashalvov's full-sized avatar
On work

Львов Павел pashalvov

On work
View GitHub Profile
@pashalvov
pashalvov / Example-Progress-ETA.ps1
Created April 28, 2022 07:00 — forked from michaelvdnest/Example-Progress-ETA.ps1
An example of calculating ETA for a PowerShell progress bar.
# Data Source
$items = 1..85
# Loop
$items | ForEach-Object `
-Begin {
# Initialize Tracking
$total = $items.Count
$start = Get-Date
$i = 0
<#
.SYNOPSIS
Draws graph in the Powershell console
.DESCRIPTION
Consumes datapoints and draws colored coded fully customizable graph in the Powershell console.
.PARAMETER Datapoints
Array of data points which is to be plotted on the graph