Reputation: 37
I am trying to run a powershell to create a .csv file. I have executed the script several times in powershell but I am having difficulty executing it in SSIS. I have an Execute Process Task control. The executable is pointing to my powershell .exe, and the arguments are the path and filename. When it executes I get an error:
[Execute Process Task] Error: In Executing "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-ExecutionPolicy ByPass -command". 'c:\MIMPasswordImport\PowerShellScript\MIMImport.ps1'" " at "", The process exit code was "1" while the expected was "0".
Any help would be appreciated.
Upvotes: 1
Views: 572
Reputation: 14341
Is this the only thing in the SSIS package? If so you don't need a package to create a SQL Agent job to use powershell you can do that directly. If you want to use the code as it exists you can also adapt your powershell script to a script task in an SSIS Package. Of if you just want to populate and create a csv how about using SSIS itself for the purpose. And if you want to run it exactly how it is you likely have an issue in your script that is returning information when it shouldn't as SSIS interprets the returned data differently than you think and has a specific success code that it will expect when used in a process task.
Upvotes: 1