its a Christmas miracle!
it works (well the job fails, but thats my bad not yours!) you are a jedi sir! ty…
Working code!
$sb_string4 = ‘DTEXEC –% /DTS “\”\MSDB\Example\test\”" /SERVER “\”PL-SSIS\”" /CONNECTION DBConnect;”\”Data Source=PL-SQL;Initial Catalog=example;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;\”" /CHECKPOINTING OFF /REPORTING V’
invoke-command -computername PL-SSIS -scriptblock ( $ExecutionContext.InvokeCommand.NewScriptBlock($sb_string4) )
I do have a couple of follow up questions for you if you don’t mind.
Running the below in Posh 3 works. In Posh 2 i get:
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!!!