Powershell progress bar when scrolling

772 Views Asked by At

I am trying to add a progress bar to a PowerShell script I am working on, using Write-Progress

The problem I have is that the script calls some programs that output a lot of text, causing the PowerShell console to scroll. When this scrolling happens, the progress bar also gets scrolled up, causing it to be hidden.

How can I make the progress bar cover the scrolling text, being always visible? The output of those programs needs to be visible, so hiding the output is not a solution.

1

There are 1 best solutions below

1
On BEST ANSWER

I would like you to go through the documentation of PS Progress Bar.

It is not recommended to use it for scroll-able things, you can use some other forms for the same. You can use inner progress bar to fulfill your requirement.

Hope it helps.