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 6 years and 10 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.
I have read and re-read the post: https://www.sapien.com/blog/2012/05/16/ ... sive-forms however, I am still having an issue of getting the results of my -jobScipt to return, I have resorted to use write-host to see if I can get any output but all I am left with are blank lines. I have tried to use brakepoints along with Debug which just skips right over the -jobscript block, I assume this is because it's already in a separate thread. if anyone could take a look at this and tell me where I have hosed it up I would be very grateful.
Below is my Button Click Event for the job.
I thought that this was asking for the Job data, is that malformed or not correct?
Reviewing the Get-help about_Jobs just in case I did not fully understand about doing the receive-job
Results that are expected:
First: an object with the SamAccountName
Second: The First Object is used with Get-ADuser returning an object with these properties (SamAccountName, EmailAddress, Title)
The For loop works fine outside the job; it returns what I need. However the script window is non-responsive which is why I am trying to drop this into a job.
$count and $emaillist are defined at the top of the Click event
You must either include the list in the job or pass it as an argument.
this is outside the job so how in the h@## could the job know about the list...it can't...duh thanks again for the help I could not see the trees for the forest......
This topic is 6 years and 10 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.