﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Integration Services / Data Warehousing  / Help: Execute Process Task --&amp;gt; Powershell Command / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 07:35:43 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Help: Execute Process Task --&amp;gt; Powershell Command</title><link>http://www.sqlservercentral.com/Forums/Topic1075700-364-1.aspx</link><description>Don't worry, I'm not easily offended :-)It does indeed make sense to incorporate it in SSIS if it is part of a bigger solution.</description><pubDate>Thu, 10 Mar 2011 12:33:51 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>RE: Help: Execute Process Task --&amp;gt; Powershell Command</title><link>http://www.sqlservercentral.com/Forums/Topic1075700-364-1.aspx</link><description>[quote][b]Koen Verbeeck (3/10/2011)[/b][hr][quote][b]BobMcC (3/10/2011)[/b][hr]I suppose it would be an option, but why would I want to?[/quote]Well, I don't really see a difference between running a SQL Server Agent job or running an SSIS package. :-)Both are a means to an end.Anyway, glad you found a solution.[/quote]Koen, On reflection my question about why I would want to, may have sounded snotty and I hope you know I didn't mean it that way. I was genuinely asking why I might want to use an Agent job, in case I was missing something.  To explain why I wanted it into an SSIS task is because it's but one task of several related tasks in an SSIS solution I'm building, but I didn't add that as I didn't feel like it was part of the problem.  Thanks for the reply.</description><pubDate>Thu, 10 Mar 2011 12:28:57 GMT</pubDate><dc:creator>BobMcC</dc:creator></item><item><title>RE: Help: Execute Process Task --&amp;gt; Powershell Command</title><link>http://www.sqlservercentral.com/Forums/Topic1075700-364-1.aspx</link><description>[quote][b]BobMcC (3/10/2011)[/b][hr]I suppose it would be an option, but why would I want to?[/quote]Well, I don't really see a difference between running a SQL Server Agent job or running an SSIS package. :-)Both are a means to an end.Anyway, glad you found a solution.</description><pubDate>Thu, 10 Mar 2011 12:06:01 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>RE: Help: Execute Process Task --&amp;gt; Powershell Command</title><link>http://www.sqlservercentral.com/Forums/Topic1075700-364-1.aspx</link><description>I suppose it would be an option, but why would I want to?  I just want to run a single command line utility, not much different than using the Execute Process Task to run a command line option to unzip a compressed file.I recently found out solution: in the Arguments box i put: "(get-content 'C:\YetAnotherFolder\MyFile.txt')| foreach-object{$_+',,,,,,,,,'}|set-content 'C:\YetAnotherFolder\MyFile.txt'"and it looks like it works perfectly.</description><pubDate>Thu, 10 Mar 2011 11:53:27 GMT</pubDate><dc:creator>BobMcC</dc:creator></item><item><title>RE: Help: Execute Process Task --&amp;gt; Powershell Command</title><link>http://www.sqlservercentral.com/Forums/Topic1075700-364-1.aspx</link><description>You can run Powershell commands from SQL Server Agent. Is that an option?</description><pubDate>Wed, 09 Mar 2011 12:41:36 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>Help: Execute Process Task --&amp;gt; Powershell Command</title><link>http://www.sqlservercentral.com/Forums/Topic1075700-364-1.aspx</link><description>I occasionally run a Powershell command that add characters at the end of each line in a text file. From a Powershell prompt I run the following command: (get-content "C:\Some Folder\someFile.txt")| foreach-object{$_+"xxxxx"}|set-content "C:\Some Folder\someFile.txt"I tried to set that up to run from an Execute Process Task, but I'm not doing something right.I put the the powershell command in the Executable section and the remainder of the the command in the Arguments section, but I don't have it delimited or quoted correctly (I think).If I execute the above from a DOS command prompt i.e. c:\&amp;gt;PowerShell (get-content "C:\Some Folder\someFile.txt")| foreach-object{$_+"xxxxx"}|set-content "C:\Some Folder\someFile.txt"I receive the following error: 'foreach-object{$_+"xxxxx"}' is not recognized as an internal or external command, operable program or batch file.Suggestions?</description><pubDate>Wed, 09 Mar 2011 10:21:17 GMT</pubDate><dc:creator>BobMcC</dc:creator></item></channel></rss>