Auto-commit: 2025-10-31 08:58:35
This commit is contained in:
10
Powershell-Progressbar/Progressbar.ps1
Normal file
10
Powershell-Progressbar/Progressbar.ps1
Normal file
@@ -0,0 +1,10 @@
|
||||
$Count = 1
|
||||
$Total = $OrdinateurClient.Rows.Count
|
||||
foreach ($OrdinateurIP in $OrdinateurClient) {
|
||||
Write-Progress -Activity "Processing " -status "Computers : $Count / $Total" -PercentComplete ($Count / $Total * 100) -Id 1
|
||||
$Count += 1
|
||||
$Nom = $OrdinateurIP."DISPLAYNAME"
|
||||
|
||||
}
|
||||
}
|
||||
Write-Progress -Activity 'Processing' -Completed -Id 1
|
||||
9
Powershell-Progressbar/readme.md
Normal file
9
Powershell-Progressbar/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# 📊 Progress Bar Script
|
||||
|
||||
## 🔧 What it does
|
||||
Displays a **PowerShell progress bar** while looping through a list of computers.
|
||||
Shows the current index and total count, then closes the bar at the end.
|
||||
|
||||
## ⚠️ Notes
|
||||
- `$OrdinateurClient` must contain a `DISPLAYNAME` column.
|
||||
- Run in **PowerShell 5+**.
|
||||
Reference in New Issue
Block a user