How to use SSISDeploy command in powershell script

arielman2304 676 Reputation points
2021-06-16T18:11:32.33+00:00

I'm running SSISDeploy command (documentation is here) in my CMD:

SSISDeploy.exe -s:"download\Integration Services.ispac" -d:catalog;/SSISDB/TEST/DEVOPS;"TEST03,1234" -at:win  

all working good, and now I need to run it thought powershell script (against windows server 2019 slave), so I tried this syntax:

$SSISDeploy = Start-Process -FilePath SSISDeploy.exe -ArgumentList '/source:"download\Integration Services.ispac"',"/destination:catalog;${Target};"${Env}"" -at:win -wait -PassThru -Credential $cred -RedirectStandardOutput ssisstdout.txt -RedirectStandardError ssisstderr.txt  

but it fails with exception:

Start-Process : A positional parameter cannot be found that accepts argument 'TEST03,1234'.  
+ ... SISDeploy = Start-Process -FilePath SSISDeploy.exe -ArgumentList '/so ...  
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : InvalidArgument: (:) [Start-Process], ParameterBindingException  
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand  

Can you suggest what's wrong with the syntax?

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,563 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,507 questions
0 comments No comments
{count} votes

Accepted answer
  1. arielman2304 676 Reputation points
    2021-06-17T07:07:28.33+00:00
    $StartProcessProps = @{
        FilePath               = 'SSISDeploy.exe'
        ArgumentList          = '-s:"download\Integration Services.ispac" -d:catalog;{0};{1} -at:win' -f $Target, $Env
        Wait                   = $true
        PassThru               = $true
        Credential             = $cred
        RedirectStandardOutput = 'ssisstdout.txt'
        RedirectStandardError  = 'ssisstderr.txt'
    }
    $SSISDeploy = Start-Process @StartProcessProp
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 36,256 Reputation points Microsoft Vendor
    2021-06-17T03:29:07.217+00:00

    Hi,

    Please try this.

    Start-Process -FilePath SSISDeploy.exe -ArgumentList "/source:'download\Integration Services.ispac' /destination:catalog;${Target};'${Env}' -at:win" -wait -PassThru -Credential $cred -RedirectStandardOutput ssisstdout.txt -RedirectStandardError ssisstderr.txt  
    

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.