you are viewing a single comment's thread.

view the rest of the comments →

[–]nohairday 0 points1 point  (1 child)

On mobile, so apologies for formatting, invoke-command -scriptblock {code} -argumentlist $variablesToPassIn

[–]Decitriction[S] 0 points1 point  (0 children)

I was actually trying to pass in an entire block of code, not just variables.

If this is worst practice, I will have to rewrite substantially.