Reputation: 167
When using PowerShell remoting, returned objects are serialised resulting in a loss of fidelity of the PSObject. As result I cannot access properties at the depth I need to. Is there any way I can get around this, and receive the full PSObject?
Upvotes: 0
Views: 247
Reputation: 68331
You can't get an un-serialized object from a remote session. The data stream between the sessions is SOAP. This is HTTP/HTTPS, so it has to be serialized to a text stream. You might be able to circumvent the limits on the default serialization depth by doing your own serialization on the remote side, and sending back the resulting text string, but if this is a follow-on to the previous question you posted you aren't going to have that option if you're connected to an Exchange management session. Those are "No Language" constrained sessions, which means that the only thing you can do in that session is run the Exchange cmdlets. No other language elements or commands are allowed.
What properties are you needing to access that are being lost in the serialization/deserialization process?
Upvotes: 2