Hello,
I've created a process that has multiple "PowerShellComponent - Execute Script" process steps where for each step the "StartScriptOrPath" parameter creates a remote session to the same Exchange Online instance. The "StopScriptOrPath" parameter then removes the session. Now, this process, when I run for one or two objects simultaneously, finishes just fine. However, when I start to run it for many objects, say 10, I'll start to encounter the following error for the either the "StartScriptOrPath" or "StopScriptOrPath" parameter.
"ErrorMessages (2022-02-15 06:56:41.400) Error initializing PowerShell runtime environment: Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again.
Error running initial script."
Why is it, that when run for multiple objects, the code for establishing a session errors out? Are the sessions interrupting each other when ran in parallel?
See screen shots for "StartScriptOrPath" and "StopScriptOrPath" code and process steps.
StartScriptOrPath code:
StopScriptOrPath code:
Process steps: