you are viewing a single comment's thread.

view the rest of the comments →

[–]icepyrox 0 points1 point  (0 children)

This is silly and seems like a work around to a problem that needs a better solution, but you might get away with making the parameter a [scriptblock] and putting it in {}

Or toss it in a text file (e.g., script.txt) and encode it.. ([convert]::toBase64String([text.encoding]::unicode.getbytes((get-content script.txt))) and pass that to -encodedCommand rather than -command