$jobresult = receive-job -Name GroupMemberSearch is showing output during debug, but $jobresult is empty.
In att. the new form. Thanks for you any input.
Run job as a function?
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.
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.
Re: Run job as a function?
- Attachments
-
- Retrieve-GroupsAsaJob-V3.psf
- (28.99 KiB) Downloaded 111 times
Re: Run job as a function?
You cannot really successfully debug a job that is being accessed asynchronously in a timer event.
As I noted much earlier. Your function cannot and will not return anything from a job that it starts. Forget the function. It is just making this much harder for you to understand.
As I noted much earlier. Your function cannot and will not return anything from a job that it starts. Forget the function. It is just making this much harder for you to understand.
Re: Run job as a function?
I have pointed this out a number of times. I cannot help you understand this. You need to stop, go back and learn the basics or how PowerShell and forms work. You are still guessing at most things.
There is a new book by the designer of PS and an excellent co-author. It starts from the basic concepts and carefully and clearly explains the how and why of each part of PowerShell. You should get a copy and sit down and carefully read it being sure you understand each paragraph before moving to the next one. Do not attempt to skip things you think you know.
https://www.amazon.com/Windows-PowerShe ... 1633430294
Re: Run job as a function?
Got version 2 of that in pdf, will print it and go through it. To bad though you wouldn't help me figuring out the function.
Re: Run job as a function?
Do not use The second edition get The third edition as the second version is pretty much misleading for all versions of PS post PS V2 (V3-V5.1). The most important thing is to be sure you understand each step before moving on. Test each idea in PowerSHell until you are sure you understand.
For new programmers this is critical. Once you become proficient in any language then you will be able to move faster.
For new programmers this is critical. Once you become proficient in any language then you will be able to move faster.
Re: Run job as a function?
Note: already read "Manning PowerShell in Depth 2nd (2015)" but honestly didn't worked with PS when I read it.
Appreciate your input and will act upon your advise. Ordered the book V3, will be there next week.
Appreciate your input and will act upon your advise. Ordered the book V3, will be there next week.