PowerShell from SSIS

  • I am attempting to run a simple Powershell command through SSIS. The caveat is that I am using Posh-SSH as an add-on module. The Powershell script connects to a server via SSH, runs a command and captures the results. It works fine when I run it manually in Powershell or from the command prompt. When I run it through SSIS, I get this error:

    Error: The 'New-SSHSession' command was found in the module 'Posh-SSH', but the module could not be loaded. For more information, run 'Import-Module Posh-SSH'..

    I am running this in Visual Studio, so it is executing under my account. Does anyone have any idea why the Powershell configuration would be different in Visual Studio vs power shell prompt?

    I have tried using

    • Cozy Roc Powershell task
    • TaskFactory Powershell task
    • Execute Process Task

    Thank you in advance

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • This was removed by the editor as SPAM

  • Make sure that the necessary powershell modules are installed on the server where SSIS is running. We've encountered this before, and since our SQL servers do not have internet access, someone has to install the modules manually.

  • I am running package on the same system and with the same user that I am executing the PowerShell script. I haven't attempted to deploy the package yet, as I can't get it to work in development.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply