Remote SSIS Package Execution with PowerShell 2.0

Here’s how to run SSIS packages on a remote server using PowerShell 2.0 and PowerShell remoting.  This post is short, since this is so incredibly easy.

First install PowerShell 2.0.  For Windows Server 2008 R2 and Windows 7, these are in the box.  For previous version of Windows they are available here:

Windows Management Framework https://support.microsoft.com/kb/968930

First go to your SSIS server and enable PowerShell remoting by running the command enable-psremoting, accepting the prompts.

 

image

Then go to to the server or client that will initiate the package execution and configure it to run PowerShell scripts:

image

 

Here’s the command

set-executionpolicy –scope CurrentUser –executionPolicy Unrestricted –force

This enables the current user to run PowerShell scripts.  Omit the –scope parameter to enable all users to execute scripts.

Then write a script to run the package,

Begin Listing c:\temp\runPackage.ps1

------------------------------------------

invoke-command -computername mySSISServer -scriptblock { dtexec.exe /File c:\foo\Package.dtsx }

------------------------------------------

End Listing c:\temp\runPackage.ps1

Then just run the script:

image

That’t it.  You’re running SSIS packages on a remote server.

David