Partager via


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

Comments

  • Anonymous
    August 21, 2011
    Your example of the script executing on the remote server displays errors.  Is this valid?

  • Anonymous
    January 15, 2013
    The comment has been removed