Progressbar while Job

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
jvierra
Posts: 14021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Progressbar while Job

Post by jvierra » Thu Nov 28, 2019 12:16 pm

It works correctly for me. As swoon as the function completes the progress will end. You will not likely see the last message unless you place a pause before the end of the function.

jvierra
Posts: 14021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Progressbar while Job

Post by jvierra » Thu Nov 28, 2019 4:45 pm

Where do you call it two times? It is only called once in the function.

jvierra
Posts: 14021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Progressbar while Job

Post by jvierra » Thu Nov 28, 2019 5:05 pm

You can't call it on a stopped service. You can modify the function to check the service first,

I created that as an example but you will have to learn PowerShell to understand it and use it in your code.

Post Reply