You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating a test using a nested multithreaded job. I'm having trouble assuring that the value that I have in $message2 being made available in the nested job. I don't have a problem with the script creating the text file in the directory that I specified, its just that the value turns up blank when I open the text file. By the way, I've also tried adding $using:message2 , but this just threw an error:
Start-RSJob : The value of the using variable '$using:message2' cannot be retrieved because it has not been set in the local session.
@hou8182 I don't think the $targetfolder parameter is working the way you think. Start-RSJob doesn't pass the pipelined objects into the job as a parameter Old versions used to but it changed quite some time ago. Look at this post that explains how parameters work and how you can pass parameters. You can pass message2 into your job but you'll probably want to use the -ArgumentsList parameter.
I'm creating a test using a nested multithreaded job. I'm having trouble assuring that the value that I have in $message2 being made available in the nested job. I don't have a problem with the script creating the text file in the directory that I specified, its just that the value turns up blank when I open the text file. By the way, I've also tried adding $using:message2 , but this just threw an error:
Start-RSJob : The value of the using variable '$using:message2' cannot be retrieved because it has not been set in the local session.
The text was updated successfully, but these errors were encountered: