Progress Bar for Pinging

Ask your PowerShell-related questions, including questions on cmdlet development!
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.
This topic is 7 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
RedBeardOne
Posts: 2
Last visit: Thu Mar 02, 2017 8:41 am

Progress Bar for Pinging

Post by RedBeardOne »

Hi everyone,
First post here. Just wanted to say thanks for having this community. I have been using PowerShell for a couple of years now, mostly 1-10 liners. Now, I am trying to write a self-help tool, as a part of this tool, I am running a ping stack i.e. local host, gateway, dc, google. My boss wanted a progress bar, so after searching google and asking on The Scripting Guys Forum, I came here. I am trying to understand the Add-JobTracker as a way pass values to the progress bar but I am making little progress. I can get it to work if I am just trying to make it count to 100, but beyond that my form just hangs.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Progress Bar for Pinging

Post by jvierra »

You have to read the output of the ping in the update script.

A ping is not a good choice for a progress bar. I would just display the results in a textbox as they arrive.

If you are asking for count of 50 then set the pbar to 50 and increment it every time you receive a result.
User avatar
RedBeardOne
Posts: 2
Last visit: Thu Mar 02, 2017 8:41 am

Re: Progress Bar for Pinging

Post by RedBeardOne »

Thanks for the reply. I will look for that on the forums here, and then come back if I have another question.
This topic is 7 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked