<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Use the PowerShell Passthru Parameter and Get Back Objects</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/18/use-the-powershell-passthru-parameter-and-get-back-objects.aspx</link><description>Summary: Learn how to use the passthru parameter in Windows PowerShell to return objects from commands and allow more management tools.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Use the PowerShell Passthru Parameter and Get Back Objects</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/18/use-the-powershell-passthru-parameter-and-get-back-objects.aspx#3466162</link><pubDate>Fri, 18 Nov 2011 20:17:50 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3466162</guid><dc:creator>JV</dc:creator><description>&lt;p&gt;Consider the following:&lt;/p&gt;
&lt;p&gt;if(Import-Module ace){&amp;#39;true&amp;#39;}else{&amp;#39;false&amp;#39;}&lt;/p&gt;
&lt;p&gt;if(Import-Module ace -passthru){&amp;#39;true&amp;#39;}else{&amp;#39;false&amp;#39;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3466162" width="1" height="1"&gt;</description></item><item><title>re: Use the PowerShell Passthru Parameter and Get Back Objects</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/18/use-the-powershell-passthru-parameter-and-get-back-objects.aspx#3466050</link><pubDate>Fri, 18 Nov 2011 09:49:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3466050</guid><dc:creator>Klaus Schulte</dc:creator><description>&lt;p&gt;Hi Ed,&lt;/p&gt;
&lt;p&gt;this is quite interesting!&lt;/p&gt;
&lt;p&gt;I rarely used the -passthrough parameter and in fact I might have even forgotten about it if you hadn&amp;#39;t reminded me by now :-)&lt;/p&gt;
&lt;p&gt;Getting hold of a handle to objects created by some cmldlets is a nice feature that let&amp;#39;s us control the object effortlessly! &lt;/p&gt;
&lt;p&gt;There are a lot of situations where you have to get control over already existing objects which maybe a pain or even impossible in certain situations. In general it is always a good idea to keep a handle to an object created by us unless we definitely know, that this is not needed during the lifetime of the object.&lt;/p&gt;
&lt;p&gt;Klaus.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3466050" width="1" height="1"&gt;</description></item></channel></rss>