<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Invoke-Expression considered harmful</title><link>http://blogs.msdn.com/b/powershell/archive/2011/06/03/invoke-expression-considered-harmful.aspx</link><description>The PowerShell team frequently gets questions that start out &amp;ldquo;how do I get the quoting right for&amp;hellip;&amp;rdquo; and the answer turns out to usually be &amp;ndash; there is a simpler way &amp;ndash; don&amp;rsquo;t use Invoke-Expression. 
 The problem arises</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Invoke-Expression considered harmful</title><link>http://blogs.msdn.com/b/powershell/archive/2011/06/03/invoke-expression-considered-harmful.aspx#10305715</link><pubDate>Wed, 16 May 2012 07:50:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10305715</guid><dc:creator>Sigh</dc:creator><description>&lt;p&gt;I don&amp;#39;t get it.&lt;/p&gt;
&lt;p&gt;People use it even when there&amp;#39;s obviously no need to. This is what happens when you add do-not-use features to a programming language.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/05/14/10304701.aspx#10305327"&gt;blogs.msdn.com/.../10304701.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10305715" width="1" height="1"&gt;</description></item><item><title>re: Invoke-Expression considered harmful</title><link>http://blogs.msdn.com/b/powershell/archive/2011/06/03/invoke-expression-considered-harmful.aspx#10194680</link><pubDate>Thu, 11 Aug 2011 01:48:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10194680</guid><dc:creator>Rob Campbell</dc:creator><description>&lt;p&gt;When the quoting on command arguments starts to get complicated, I usually just put the darned thing into a here-string and run that. Double qoted if I need to do substitution, single if not. &amp;nbsp;It saves a lot of futzing around with escaping and quotes stacked two and sometimes 3 deep around arguments.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10194680" width="1" height="1"&gt;</description></item><item><title>re: Invoke-Expression considered harmful</title><link>http://blogs.msdn.com/b/powershell/archive/2011/06/03/invoke-expression-considered-harmful.aspx#10191740</link><pubDate>Mon, 01 Aug 2011 17:47:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10191740</guid><dc:creator>pamarths</dc:creator><description>&lt;p&gt;Still it is not clear to me why invoke-expression is pron to code injections when compared to using invocation operator &amp;#39;&amp;amp;&amp;#39;. Any example is appreciated.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10191740" width="1" height="1"&gt;</description></item><item><title>re: Invoke-Expression considered harmful</title><link>http://blogs.msdn.com/b/powershell/archive/2011/06/03/invoke-expression-considered-harmful.aspx#10187681</link><pubDate>Mon, 18 Jul 2011 22:33:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10187681</guid><dc:creator>0ptikGhost</dc:creator><description>&lt;p&gt;I blogged about this once too! &lt;a rel="nofollow" target="_new" href="http://0ptikghost.blogspot.com/2011/02/executing-native-commands-in-powershell.html"&gt;0ptikghost.blogspot.com/.../executing-native-commands-in-powershell.html&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10187681" width="1" height="1"&gt;</description></item></channel></rss>