<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Bootstrapping scripts</title>
	<atom:link href="http://josherickson.org/2009/01/10/185/bootstrapping-scripts/feed" rel="self" type="application/rss+xml" />
	<link>http://josherickson.org/2009/01/10/185/bootstrapping-scripts</link>
	<description>And as you tread the halls of sanity...</description>
	<lastBuildDate>Thu, 09 Sep 2010 17:35:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Creating a random password - JoshErickson.org, it's dot com!</title>
		<link>http://josherickson.org/2009/01/10/185/bootstrapping-scripts/comment-page-1#comment-99</link>
		<dc:creator>Creating a random password - JoshErickson.org, it's dot com!</dc:creator>
		<pubDate>Wed, 21 Jan 2009 15:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://josherickson.org/?p=185#comment-99</guid>
		<description>[...] Lee Holmes’ comments, I’ve updated the file and function with some of the suggestions he gave. Unfortunately, the [...]</description>
		<content:encoded><![CDATA[<p>[...] Lee Holmes’ comments, I’ve updated the file and function with some of the suggestions he gave. Unfortunately, the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh</title>
		<link>http://josherickson.org/2009/01/10/185/bootstrapping-scripts/comment-page-1#comment-97</link>
		<dc:creator>josh</dc:creator>
		<pubDate>Sat, 10 Jan 2009 23:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://josherickson.org/?p=185#comment-97</guid>
		<description>Thanks for the comment Mr. Holmes!

The param()&#039;s looks very promising, especially now that I&#039;m branching off from simple straight up PS scripting to making libraries of code to handle things.

Help comments handled by the shell?! No way! Another reason I can&#039;t wait for V2!

Thanks for the pointer on XML, however I went this route as I wanted to have the version.xml file as human readable as possible (and it was a fun challenge to learn about System.XML). I don&#039;t know if Export-clixml has changed with V2, but I find that V1 has bloat that could be forgotten when updating the file by hand. Perhaps if I had a UI or another script that handled updating version.xml I would go that route. (I could however see that export-clixml could be used for the local version.xml!)

Thanks again! It&#039;s quite an honor to be critiqued by you!

-Josh Erickson</description>
		<content:encoded><![CDATA[<p>Thanks for the comment Mr. Holmes!</p>
<p>The param()&#8217;s looks very promising, especially now that I&#8217;m branching off from simple straight up PS scripting to making libraries of code to handle things.</p>
<p>Help comments handled by the shell?! No way! Another reason I can&#8217;t wait for V2!</p>
<p>Thanks for the pointer on XML, however I went this route as I wanted to have the version.xml file as human readable as possible (and it was a fun challenge to learn about System.XML). I don&#8217;t know if Export-clixml has changed with V2, but I find that V1 has bloat that could be forgotten when updating the file by hand. Perhaps if I had a UI or another script that handled updating version.xml I would go that route. (I could however see that export-clixml could be used for the local version.xml!)</p>
<p>Thanks again! It&#8217;s quite an honor to be critiqued by you!</p>
<p>-Josh Erickson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee Holmes</title>
		<link>http://josherickson.org/2009/01/10/185/bootstrapping-scripts/comment-page-1#comment-96</link>
		<dc:creator>Lee Holmes</dc:creator>
		<pubDate>Sat, 10 Jan 2009 21:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://josherickson.org/?p=185#comment-96</guid>
		<description>That looks great. A couple points of feedback:

- The param() statement is the ideal way to define script parameters. When you define a parameter through a param statement, you only need to type as much of the parameter name required to disambiguate it from other parameters.

PS:34 &gt; function foo { param([switch] $help) if($help) { &quot;Help!&quot; } }

PS:35 &gt; foo -h
Help!

- You might find Import-CliXml / Export-CliXml to be easier data structures to deal with (rather than digging through XML)

PS &gt; $versionInfo = @{ Version = 1.0; File = &quot;http://foo&quot; }
PS &gt; Export-Clixml -In $versionInfo -Path version.xml
PS &gt; $versionInfo = Import-CliXml version.xml
PS &gt; $versionInfo.Version
1

PS &gt; $versionInfo.File
http://foo

- You might consider formatting your help instead as help comments. We intentionally designed them to work in V1, but light up in V2: http://blogs.msdn.com/powershell/archive/2008/12/23/advanced-functions-and-test-leapyear-ps1.aspx

Hope this helps,

Lee Holmes [MSFT]
Windows PowerShell Development</description>
		<content:encoded><![CDATA[<p>That looks great. A couple points of feedback:</p>
<p>- The param() statement is the ideal way to define script parameters. When you define a parameter through a param statement, you only need to type as much of the parameter name required to disambiguate it from other parameters.</p>
<p>PS:34 &gt; function foo { param([switch] $help) if($help) { &#8220;Help!&#8221; } }</p>
<p>PS:35 &gt; foo -h<br />
Help!</p>
<p>- You might find Import-CliXml / Export-CliXml to be easier data structures to deal with (rather than digging through XML)</p>
<p>PS &gt; $versionInfo = @{ Version = 1.0; File = &#8220;http://foo&#8221; }<br />
PS &gt; Export-Clixml -In $versionInfo -Path version.xml<br />
PS &gt; $versionInfo = Import-CliXml version.xml<br />
PS &gt; $versionInfo.Version<br />
1</p>
<p>PS &gt; $versionInfo.File<br />
<a href="http://foo" rel="nofollow">http://foo</a></p>
<p>- You might consider formatting your help instead as help comments. We intentionally designed them to work in V1, but light up in V2: <a href="http://blogs.msdn.com/powershell/archive/2008/12/23/advanced-functions-and-test-leapyear-ps1.aspx" rel="nofollow">http://blogs.msdn.com/powershell/archive/2008/12/23/advanced-functions-and-test-leapyear-ps1.aspx</a></p>
<p>Hope this helps,</p>
<p>Lee Holmes [MSFT]<br />
Windows PowerShell Development</p>
]]></content:encoded>
	</item>
</channel>
</rss>
