<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://consultingblogs.emc.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">FruitCase's Blog</title><subtitle type="html" /><id>http://consultingblogs.emc.com/richardcase/atom.aspx</id><link rel="alternate" type="text/html" href="http://consultingblogs.emc.com/richardcase/default.aspx" /><link rel="self" type="application/atom+xml" href="http://consultingblogs.emc.com/richardcase/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.20423.1">Community Server</generator><updated>2008-02-06T11:08:00Z</updated><entry><title>PowerShell Script Task moved to CodePlex</title><link rel="alternate" type="text/html" href="http://consultingblogs.emc.com/richardcase/archive/2008/02/19/PowerShell-Script-Task-moved-to-CodePlex.aspx" /><id>http://consultingblogs.emc.com/richardcase/archive/2008/02/19/PowerShell-Script-Task-moved-to-CodePlex.aspx</id><published>2008-02-19T17:51:06Z</published><updated>2008-02-19T17:51:06Z</updated><content type="html">&lt;p&gt;In my last &lt;a href="http://blogs.conchango.com/richardcase/archive/2008/02/06/PowerShell-Script-Task-for-SSIS.aspx"&gt;post&lt;/a&gt; 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. &lt;/p&gt;  &lt;p&gt;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 &lt;a href="http://www.codeplex.com/PowerShellScriptTask"&gt;homepage&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There is still plenty of work to do on the task including:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Creating an installer using WiX&lt;/li&gt;    &lt;li&gt;Exposing SSIS connections to PowerShell&lt;/li&gt;    &lt;li&gt;Exposing the current transaction to PowerShell&lt;/li&gt;    &lt;li&gt;Script validation&lt;/li&gt;    &lt;li&gt;Improved script editor&lt;/li&gt;    &lt;li&gt;PowerShell v2 support&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you have any suggestions or questions regarding the task then feel free to ask them in the &lt;a href="http://www.codeplex.com/PowerShellScriptTask/Thread/List.aspx"&gt;discussion group&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=9803" width="1" height="1"&gt;</content><author><name>Richard.Case</name><uri>http://consultingblogs.emc.com/members/Richard.Case.aspx</uri></author><category term="SSIS" scheme="http://consultingblogs.emc.com/richardcase/archive/tags/SSIS/default.aspx" /><category term="PowerShell" scheme="http://consultingblogs.emc.com/richardcase/archive/tags/PowerShell/default.aspx" /><category term="CodePlex" scheme="http://consultingblogs.emc.com/richardcase/archive/tags/CodePlex/default.aspx" /></entry><entry><title>PowerShell Script Task for SSIS</title><link rel="alternate" type="text/html" href="http://consultingblogs.emc.com/richardcase/archive/2008/02/06/PowerShell-Script-Task-for-SSIS.aspx" /><id>http://consultingblogs.emc.com/richardcase/archive/2008/02/06/PowerShell-Script-Task-for-SSIS.aspx</id><published>2008-02-06T11:08:00Z</published><updated>2008-02-06T11:08:00Z</updated><content type="html">&lt;p&gt;I have to admit it, I&amp;#39;m a bit of a PowerShell geek. I chat regularly with a colleague of mine &lt;a href="http://blogs.conchango.com/jamessaull/default.aspx"&gt;James Saull&lt;/a&gt; about new ways in which we can use PowerShell. We&amp;#39;ve already decided we are going to hook up a &lt;a href="http://www.firebox.com/product/1742?src_t=wnw"&gt;USB Panic Button&lt;/a&gt; to PowerShell so that we can launch our deployment scripts when the button is hit (more on this project as it develops). &lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;SSIS variables can be read in your script: &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;pre style="background-color:#f4f4f4;"&gt;$file = $ssis.Variables[&lt;span&gt;&amp;quot;User::FileName&amp;quot;&lt;/span&gt;];&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;SSIS variables can be written to in your script: &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;pre style="background-color:#f4f4f4;"&gt;$ssis.Variables[&lt;span class="str"&gt;&amp;quot;User::AlbumCount&amp;quot;&lt;/span&gt;] = $albumCount;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;You can log information/warning/error messages to SSIS: &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;pre style="background-color:#f4f4f4;"&gt;$ssis.LogWarning(10, &lt;span class="str"&gt;&amp;quot;Something has gone wrong&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;The task implements a custom PowerShell host. This means that host specific cmdlets like &lt;strong&gt;Write-Host &lt;/strong&gt;are integrated with SSIS &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There is still more work to be done. In the next release I am planning on:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Exposing the SSIS connections to PowerShell &lt;/li&gt;&lt;li&gt;Exposing the current transaction (if applicable) to PowerShell &lt;/li&gt;&lt;li&gt;Script validation &lt;/li&gt;&lt;li&gt;Improved script editor &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Feel free to &lt;a href="http://cid-b6003fc352927878.skydrive.live.com/self.aspx/Blog/PowerShellScriptTask.zip" target="_blank"&gt;download&lt;/a&gt; the task and play. Any feedback would be appreciated.&lt;/p&gt;&lt;p&gt;In my next post i will discuss some of the code used in the task specifically around hosting PowerShell.&lt;/p&gt;&lt;p&gt;Enjoy.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://consultingblogs.emc.com/aggbug.aspx?PostID=9681" width="1" height="1"&gt;</content><author><name>Richard.Case</name><uri>http://consultingblogs.emc.com/members/Richard.Case.aspx</uri></author><category term="SSIS" scheme="http://consultingblogs.emc.com/richardcase/archive/tags/SSIS/default.aspx" /><category term="PowerShell" scheme="http://consultingblogs.emc.com/richardcase/archive/tags/PowerShell/default.aspx" /></entry></feed>
