Implementing the Progress Bar: Using the Write-Progress cmdlet in PowerShell, you can easily integrate a progress bar into your scripts. Here’s a simple example:

$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


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.