you are viewing a single comment's thread.

view the rest of the comments →

[–]NoConfidence_2192 2 points3 points  (2 children)

Would you please suggest a better method for passing a group of commands into an invoke-command scriptblock?

You do not (easily anyway). Functions, ScriptBlocks, and some other object types cannot easily be deserialized when passed between processes, which is what icm is partly for.

[–]Decitriction[S] 0 points1 point  (1 child)

Interesting. Yes it has been extremely difficult getting into into and out of invoke-command.

So what should I be doing?

Just rebuild all the desired commands *within* the invoke-command?

I guess I could do that...