In this recipe, we will see how to create a folder in the SSIS instance and package store.
For this recipe, we will create a timestamped folder prefixed with the word QueryWorks
. Feel free to replace it with your folder name by changing the $newFolder
variable.
These are the steps required to create folders in the package store and SSIS instance:
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" $ts = Get-Date -format "yyyy-MMM-dd-hhmmtt" $newFolder = "QueryWorks File System $($ts)" #folder in package store #will appear under "Stored Packages > File System" if (!$app.FolderExistsOnDtsServer("\File...