Welcome to blogs.conchango.com Sign in | Join | Help

Welcome to blogs.conchango.com

FruitCase's Blog

  • PowerShell Script Task moved to CodePlex

    In my last post I introduced the PowerShell Script Task for SSIS. Since then a few colleagues have suggested that I create a project on CodePlex so that the community as a whole can get involved.

    Great idea! So, if you are interested in contributing to the project (or just want to have a butchers at the code) then drop by the project's homepage.

    There is still plenty of work to do on the task including:

    • Creating an installer using WiX
    • Exposing SSIS connections to PowerShell
    • Exposing the current transaction to PowerShell
    • Script validation
    • Improved script editor
    • PowerShell v2 support

    If you have any suggestions or questions regarding the task then feel free to ask them in the discussion group.

  • PowerShell Script Task for SSIS

    I have to admit it, I'm a bit of a PowerShell geek. I chat regularly with a colleague of mine James Saull about new ways in which we can use PowerShell. We've already decided we are going to hook up a USB Panic Button to PowerShell so that we can launch our deployment scripts when the button is hit (more on this project as it develops).

    One Friday afternoon James mentioned in passing how cool it would be if you could run PowerShell scripts from within a SSIS package. Hmmm, what a great idea. The PowerShell Script Task had been born.

    So i set to work creating a control flow task for SSIS that allows you to run PowerShell script. The initial features of the task are:

    • SSIS variables can be read in your script:
    $file = $ssis.Variables["User::FileName"];
    • SSIS variables can be written to in your script:
    $ssis.Variables["User::AlbumCount"] = $albumCount;
    • You can log information/warning/error messages to SSIS:
    $ssis.LogWarning(10, "Something has gone wrong");
    • The task implements a custom PowerShell host. This means that host specific cmdlets like Write-Host are integrated with SSIS

    There is still more work to be done. In the next release I am planning on:

    • Exposing the SSIS connections to PowerShell
    • Exposing the current transaction (if applicable) to PowerShell
    • Script validation
    • Improved script editor

    Feel free to download the task and play. Any feedback would be appreciated.

    In my next post i will discuss some of the code used in the task specifically around hosting PowerShell.

    Enjoy. 

     

Powered by Community Server (Personal Edition), by Telligent Systems