diff --git a/Fun-Random/Fun Progress Bar.ps1 b/Fun-Random/Fun Progress Bar.ps1 new file mode 100644 index 0000000..208a9a0 --- /dev/null +++ b/Fun-Random/Fun Progress Bar.ps1 @@ -0,0 +1,10 @@ +$i = 0 +$total = 100 + +while ($i -lt $total) { + Write-Progress -Activity "Processing..." -Status "Progress: $($i / $total * 100)%" -PercentComplete ($i / $total * 100) + $i++ + Start-Sleep -Milliseconds 100 # Simulate work being done +} + +Write-Progress -Activity "Processing..." -Status "Completed!" -PercentComplete 100 -Completed \ No newline at end of file