Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Invoke-Command with ; in script

$
0
0

Oh, I see one problem that you’ll need to correct. Instead of this:

invoke-command -computername PL-SSIS -scriptblock { $ExecutionContext.InvokeCommand.NewScriptBlock($sb_string4) }

You want to do this:

invoke-command -computername PL-SSIS -scriptblock ( $ExecutionContext.InvokeCommand.NewScriptBlock($sb_string4) )

The only difference is in the brackets. In the former, you’re invoking a script block that in turn creates a script block (but doesn’t invoke it). In the latter, you’re invoking a script block that you create.

Also regarding the command line for DTEXEC, make sure you are entering –% correctly (as in dash, dash, percent). It doesn’t appear to be two dashes on these forums, but it is two dashes followed by a percent sign.


Viewing all articles
Browse latest Browse all 13067

Trending Articles