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.
This topic is 3 years and 8 months 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.
Product, version and build: 5.7.174.0
32 or 64 bit version of product: 64
Operating system: Win 10
32 or 64 bit OS: 64
Hey all
I am still having some trouble getting the Start-Job button to work. I was curious about the parameters that need to be passed on and the argument list. Does this need to be any variables you have in the script? Below is what I am trying to run. It will start to run and then give me errors the the $ComputerName variable is null, but none of the text that i have to be displayed in the rick text box will show, even if it fails, i.e. "Please Wait". Below is the code I am using, can someone show me what I am doing wrong with this?
Thanks
Appreciate the reply. So I guess thats where I am getting lost. What exactly needs to be in the ArgumentList? Is it any variables I have in the scriptblock? I am not running any arguments on this, currently, unless I am misunderstanding what is being asked.
So I did move the computername variable and added in a message so I can see that it is pulling the PC name (I created a small form to test all this in) It runs and outputs the "Trying to ping $computername" into $outputBox2 but then just hangs and doesn't ever output the results and the Start Job button never goes back to Enabled, but stays grayed out. I am adding in the revised script for the Start Job button. Not sure what I am doing incorrectly. I have seen examples online and I do not see any major differences between what I am running and the examples of working scripts.
Thanks for the reply. I added that in and the results are the same. I added in a line to clear the outputbox (outside of the scriptblock) before the results are added in, but even that does not happen, and the button never goes back to enabled, signaling that the completed script portion has been reached, so it does not look like even that simple scriptblock is completing. I am not sure what I am missing, as I am using the edits to the code that you have provided
This topic is 3 years and 8 months 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.