<?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>Design Your PowerShell Functions to Be Reusable</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/20/design-your-powershell-functions-to-be-reusable.aspx</link><description>Summary : Learn how to write Windows PowerShell functions that are reusable so that you increase your productivity.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Design Your PowerShell Functions to Be Reusable</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/20/design-your-powershell-functions-to-be-reusable.aspx#3430668</link><pubDate>Fri, 20 May 2011 15:10:09 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3430668</guid><dc:creator>Brian T Young</dc:creator><description>&lt;p&gt;@June Blender&lt;/p&gt;
&lt;p&gt;June thank you for your diligent work to create the help comments, they are invaluable and I use them extensively. &amp;nbsp;I also put them in all of my functions. &amp;nbsp;I love comment based help.&lt;/p&gt;
&lt;p&gt;Regards, &lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3430668" width="1" height="1"&gt;</description></item><item><title>re: Design Your PowerShell Functions to Be Reusable</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/20/design-your-powershell-functions-to-be-reusable.aspx#3430667</link><pubDate>Fri, 20 May 2011 15:07:05 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3430667</guid><dc:creator>Brian T Young</dc:creator><description>&lt;p&gt;Great article Andy, thanks. &amp;nbsp;Klaus hit the nail on the head with his comments. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The scripting games this year sure did solidify and improve my scripting skills. &amp;nbsp;I have already developed and implemented custom functions that are reusable and utilize the pipeline.&lt;/p&gt;
&lt;p&gt;To add to the comments from Klaus and the article, keep things simple, have your function do one thing and do it well.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3430667" width="1" height="1"&gt;</description></item><item><title>re: Design Your PowerShell Functions to Be Reusable</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/20/design-your-powershell-functions-to-be-reusable.aspx#3430656</link><pubDate>Fri, 20 May 2011 14:32:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3430656</guid><dc:creator>June Blender</dc:creator><description>&lt;p&gt;-- Start PowerShell with the -NoProfile switch. This prevents you from using functions, variables, and aliases from your profile in your script.&lt;/p&gt;
&lt;p&gt;-- Always add help. :)&lt;/p&gt;
&lt;p&gt;Thanks, Andy!&lt;/p&gt;
&lt;p&gt;June Blender [MSFT]&lt;/p&gt;
&lt;p&gt;Windows PowerShell Documentation&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3430656" width="1" height="1"&gt;</description></item><item><title>re: Design Your PowerShell Functions to Be Reusable</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/20/design-your-powershell-functions-to-be-reusable.aspx#3430599</link><pubDate>Fri, 20 May 2011 11:14:46 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3430599</guid><dc:creator>Steve Murawski</dc:creator><description>&lt;p&gt;Klaus beat me to saying it.. this article ties together a bunch of the other wrap up articles. &lt;/p&gt;
&lt;p&gt;Nice work Andy.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3430599" width="1" height="1"&gt;</description></item><item><title>re: Design Your PowerShell Functions to Be Reusable</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/20/design-your-powershell-functions-to-be-reusable.aspx#3430563</link><pubDate>Fri, 20 May 2011 09:07:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3430563</guid><dc:creator>Klaus Schulte</dc:creator><description>&lt;p&gt;Thanks Andy,&lt;/p&gt;
&lt;p&gt;this is a very pragmatical approach to writing reusable functions!&lt;/p&gt;
&lt;p&gt;Some good advise and the hope that we may improve our style after a couple of functions have been written ... right!&lt;/p&gt;
&lt;p&gt;Refering to the previous articles, all these aspects lead to reusabilty:&lt;/p&gt;
&lt;p&gt;- Comment your work wisely ( use comment-based-help )&lt;/p&gt;
&lt;p&gt;- name the variables in an approprate way&lt;/p&gt;
&lt;p&gt;- use objects&lt;/p&gt;
&lt;p&gt;- ... and so on ...&lt;/p&gt;
&lt;p&gt;Remembering them helps to write reusable functions!&lt;/p&gt;
&lt;p&gt;Kind regards, Klaus&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3430563" width="1" height="1"&gt;</description></item></channel></rss>