Downloading an SSIS package to a file
This recipe will download an SSIS package back to a .dtsx
file.
Getting ready
Locate a package stored in the package store that you want to download to the filesystem. Note the path to this package.
How to do it...
These are the steps required to download an SSIS package:
- 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" $timestamp = Get-Date -format "yyyy-MMM-dd-hhmmtt" $destinationFolder = "C:\SSIS\SSIS $($timestamp)" #If the path exists, will error silently and continue New-Item -ItemType Directory -Path $destinationFolder -ErrorAction SilentlyContinue $packageToDownload = "Customer Package...