To run a PowerShell Script from SSIS package (Updated)




Step 1:  Add an "Execute Process Task" in SSIS package;

Step 2: Edit>>Process>>Executable: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe

Step 3: Edit>>Process>>Arguments: -ExecutionPolicy ByPass -command " powershell  'C:\temp\call_backup_cmdlet_with_parameter.ps1' 'myDB1,myDB2' "


Step 4(Optional) You can setup an agent job to run this SSIS package

 

Early post:
https://jingyangli.wordpress.com/2011/09/28/to-run-a-powershell-script-from-ssis-package/

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s