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: 14456
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Progressbar while Job

Post by jvierra »

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: 14456
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Progressbar while Job

Post by jvierra »

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

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

Re: Progressbar while Job

Post by jvierra »

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.

Locked