Deploying an SSIS package to the package store
In this recipe, we will deploy an SSIS package (.dtsx
) to the SSIS package store.
Getting ready
In this recipe, we will use a Customer Package.dtsx
package saved in C:\SSIS
and deploy this to our SSIS instance. The package will be saved in the \File System\QueryWorks
package folder.
To follow this recipe, use a .dtsx
package that is readily available in your environment and decide where you want it deployed.
How to do it...
Let's explore the code required to deploy an SSIS .dtsx
file:
- Open PowerShell ISE as an administrator.
- Add the
ManagedDTS
assembly as follows:#add ManagedDTS assembly Add-Type -AssemblyName "Microsoft.SqlServer.ManagedDTS, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
- Add the following script and run it:
$server = "localhost" #create new app $app = New-Object "Microsoft.SqlServer.Dts.Runtime.Application" #specify package to be deployed $dtsx = "C:\SSIS\Customer Package...