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 5 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.
Hey,
at the moment i try to add a progress bar to my project. This progress bar should show the progress of a connection to my AD- and Exchange-Server.
I have already looked up here in the forum but can not find a solution for me.
How the progress bar can synchronous with the progress of the function[Connection to the AD-Server] below?
Im so sorry. But what i like to ask is how to build a progress bar like this: viewtopic.php?f=12&t=12486&p=67236&hili ... ion#p67236
MDinice has a progress bar showing the progress of a connection to the server. This is what i would like to ad to my project because i and the employee can not see the progress of the connection and still wait without any response / progress.
MDinice does this with the Measure-Command. But i would like to have it synchron between the progress bar and the build of the connection
Each row comes back with the target system name attached. All errors and issues are summarized in the "Job" object's "ChildJobs". Every job runs in parallel on the remote systems.
Using the UpdateScript to read the results will allow you to correctly set the progress bar without conflict.
bhnuser wrote: ↑Wed Feb 06, 2019 11:25 pm
Im so sorry. But what i like to ask is how to build a progress bar like this: viewtopic.php?f=12&t=12486&p=67236&hili ... ion#p67236
MDinice has a progress bar showing the progress of a connection to the server. This is what i would like to ad to my project because i and the employee can not see the progress of the connection and still wait without any response / progress.
MDinice does this with the Measure-Command. But i would like to have it synchron between the progress bar and the build of the connection
Why do you need a connection? Your code uses WMI which does its own remoting more efficiently.
There are a couple of links in the topic you are referencing. They explain how to use the ProgressBar control.
1. Since the process bar is animated, it might take a little time before the animation completes. This also depends on how you are handling the loop with the progress bar. Refer to the following article:
The topic you referenced was never completed. The user abandoned what he was trying to do because it doesn't make much sense. You code and use of multiple jobs does not match the design and implementation of a progress bar. The best you can do is to provide incremental output that is consumed in the UpdateScript code and have that update the progress bar. I can think of no other way to use your code to do what you are asking.
I also cannot understand why you want to do this. The connections locally are very fast. The topic you referenced can take time because they are connections to the cloud (Azure). Even those are fast and would not require a progress bar.
Yeah i see this is not easy as i thought. The Problem is, that i create 3 PS-Sessions and while i start the programm it takes about 30 seconds and this is a little bit frustrating if you do not see any progress on the start.
Firstly i try it with an animated button while i select specific user with Get-ADUser. Maybe someone has a solution, how i can use the arguments to pass them to the Job. Here are the variables that should be passed to the job:
A progress bar and job cannot be used to connect a session. The session will not be available if created in a job.
There is no way to do what you ask. You can just output each step of the connection to a textbox.
Your code does not do what you say. It is not creating any sessions. It is getting back users. If you don't save them in a variable then send them to the pipeline and return them in the Update script.
This topic is 5 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.