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 Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,390 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 45,096 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