Dear all,
I am attempting to use start-job in combination with a function that returns a Invoke-Webrequest session variable.
When performing .getType() on returned variable:
IsPublic IsSerial Name BaseType
True False WebRequestSession System.Object
However when using job-start (or related commands) it changes the object to:
IsPublic IsSerial Name BaseType
True False PsObject System.Object
This object is no longer a valid Invoke-Session variable and is rejected by all following Invoke-WebRequest commands. Although the variable contains all the required data,
Question: How can I instruct start-job (or receive-job) to return the object in its original state? It seems receive-job always returns a PsObject.
Best Regards,
Christian