Executing Powershell commands using SSIS

In this post ,we are going to see two about two cases

i)saving powershell commands inside a file with file extension as ps1 and then invoking that file to execute the powershell commands

ii)executing powershell commands using SSIS - Execute Process Task

As a first step, i am going to open a notepad and place the below powershell commands inside it and then save it as .ps1 under path location "C:\Scripts\test.ps1"

$UserInput = Read-Host "Is Powershell really a cool feature"
##moving file to archieve folder
Move-Item D:\myflatfile.txt D:\archieve

And in my Execute Process Task i have entered only Executable & Arguments

And when you execute the package

Reference - http://technet.microsoft.com/en-us/library/79d83bd4-1c92-4681-afe7-ab90053b4822

No comments: