Really not sure where to go from here? any help or suggestions? It seems that im having the same sort of problem as the forum user, but where as the fix worked for him its not for me 🙁 so i still have problem with ";"s and other Powershell related commands being seen in the script?

The problem is that you cannot create a script block from a string that defines the script if that script cannot be parsed in PowerShell. Your quotation marks in your string used to create the script block are not parsable in their current state.

If you look at the above string and try to break it down into tokens with PowerShell, you'll end up with a pretty big mess because of the double-quotes. For example, here are the first few tokens in your string that you are trying to use to create a script block:

DTEXEC.EXE
/SQL
"\"
\Example\test\
""
/SERVER
"\"
Server-SSIS\
""
...

That is not how you want these to be defined. You want something more like this:

Have you tried using the special –% parameter in your DTEXEC calls? When you are calling command line utilities, some of them (such as this one) have unusual characters required in their parameters, including semi-colons, quotes, etc. These characters cause problems for PowerShell's parser. You can work around this by using –% to instruct PowerShell to pass the remaining arguments in as is, without parsing (therefore ignoring how it would normally handle quotes, semi-colons, etc.).

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.

Exception calling "NewScriptBlock" with "1" argument(s): "Unexpected token 'data' in expression or statement."
At line:4 char:99
+ invoke-command -computername PL-SSIS -scriptblock ( $ExecutionContext.InvokeCommand.NewScriptBlock <<<< ($sb_string4) )
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
Where can i read up on the alts you did.. never seen –% before and im guessing the InvokeCommand.NewScriptBlock is either Posh 3 or using .net?
Thanks for the help and sticking it with it... its awesome to have it working! thankyou!!!