Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM. Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 4 years and 5 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.
If I start multiple PowerShell jobs using the snippet below, the 'child' processes are grouped together under the invoking/parent process in Task Manager:
Example showing jobs grouped nicely under 'parent' process:
Yet if I create a number of jobs in a Service created using PowerShell Studio, the jobs created appear in Task Manager ungrouped, as though they're independant processes.
Example showing loose/ungrouped jobs created by PowerShell Service
Does anyone know why this happens? It might just be because the job is being created by a background application/service and is expected Windows behaviour; rather than strange behaviour caused by PowerShell Studio!
First of all, a process is always an independent entity. Since you are creating a new process using Start-Job, which is a Microsoft PowerShell CmdLet, you should probably ask there what exactly they do behind the scenes.
The most likely explanation is that if you start a job from a console, stdin, stdout and stderr of the new process share the same streams of the 'parent' process, hence it creates a dependence and relation.
If you start your jobs from a non-console process, like a service, there is no console and stdin, stdout and stderr mean nothing, so they are likely not shared (I did not verify this).
That in turn means that Task Manager has no means to correlate these processes and group them, because they do not share anything.
This topic is 4 years and 5 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.