Write-Progress only works on first Powershell ISE Tab

rainmakers 311 Reputation points
2021-10-08T20:44:13.827+00:00

When working with Powershell ISE tabs, the Write-Progress only works on the first tab. Is there a way to enable it to work on all ISE tabs?

To duplicate the issue:

  1. open the ISE
  2. Paste the code snippet below in the first tab, and you will see the progress bar.
  3. goto File -> New PowerShell Tab
  4. goto the 2nd tab
  5. run the same code snippet below in the 2nd tab, and there will not be a progress bar.

Thanks in advance.

For ($i=0; $i -le 100; $i++) {
Start-Sleep -Milliseconds 20
Write-Progress -Activity "Example"  -PercentComplete $i
}
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2021-10-08T21:40:26.26+00:00

    If you close the 1st tab does it now work for the code in the other tab?

    You should know that the PowerShell ISE is no longer a supported product. You'd do well to switch to something like VS Code or Visual Studio, or some other editor. Some folks like Notepad++.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.