I have a Powershell script using the Get-QADUser cmdlet several times. This cmdlet is reporting progress with a progress bar.
So, let's consider this script,
$user = Get-QADUser "User1"
$user = Get-QADUser "User2"
$user = Get-QADUser "User3"
$user = Get-QADUser "User4"
If we consider that each statement represents 25% of my total script execution time (no need to be exact), I'd like to Write-progress based on these cmdlets' progress. In other words, this would represent a global progress bar for the script.
So, if $user = Get-QADUser "User1" is at 50% progress, I'd like to report ~13% (50% of 25%). My problem is, I don't if it's possible to have access to the Get-QADUser progress in live time.
Is their a way to call Write-Progress -PercentComplete based on a third party cmdlet in Powershell ?