<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Precision Computing</title>
	<atom:link href="http://www.leeholmes.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leeholmes.com/blog</link>
	<description>Software Design and Development</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:39:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The PowerShell Pay-it-Forward Award</title>
		<link>http://www.leeholmes.com/blog/2011/11/10/the-powershell-pay-it-forward-award/</link>
		<comments>http://www.leeholmes.com/blog/2011/11/10/the-powershell-pay-it-forward-award/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 18:09:54 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/11/10/the-powershell-pay-it-forward-award/</guid>
		<description><![CDATA[As I was going through some things, I realized that I have a handful of author copies of my PowerShell Cookbook remaining. There are several of the first edition, several of the second edition, and several of the pocket references. After thinking about what to do with them, I hereby announce the PowerShell Pay-it-Forward Award. [...]]]></description>
			<content:encoded><![CDATA[<p>As I was going through some things, I realized that I have a handful of author copies of my PowerShell Cookbook remaining. There are several of the <a href="http://www.amazon.com/Windows-Powershell-Cookbook-Exchange-2007/dp/0596528493">first edition</a>, several of the <a href="http://www.amazon.com/gp/product/0596801505/">second edition</a>, and several of the <a href="http://www.amazon.com/Windows-PowerShell-Pocket-Reference-OReilly/dp/0596521782">pocket references</a>.</p>
<p>After thinking about what to do with them, I hereby announce the PowerShell Pay-it-Forward Award.</p>
<p>If you would like a free signed copy of any of these books, I have a simple request. Go forth on the internet: Stack Overflow, blogs, Twitter, whatever. Find a PowerShell newbie with a gnarly problem. Not just a syntax problem, but some hairy business problem. Work with them to solve it.</p>
<p>Post your results back here in the comments (with a link to the interaction,) and I’ll give books to those that have helped a user (or users) the most.</p>
<p>I’ll announce the winners on December 1st.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/11/10/the-powershell-pay-it-forward-award/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Breaking Hash Codes &#8211; Part I</title>
		<link>http://www.leeholmes.com/blog/2011/11/06/breaking-hash-codes-part-i/</link>
		<comments>http://www.leeholmes.com/blog/2011/11/06/breaking-hash-codes-part-i/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 06:36:29 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/11/06/breaking-hash-codes-part-i/</guid>
		<description><![CDATA[When we last left off, we discussed hash codes &#8211; a small unique identifier for an item based on its properties or features. There are many different ways to calculate unique identifiers for items. These different ways are called Hash Algorithms. Each serves a different purpose, but some popular ones right now are are MD5, [...]]]></description>
			<content:encoded><![CDATA[<p>When we last left off, <a href="http://www.leeholmes.com/blog/2011/02/06/an-introduction-to-hashing-and-hash-codes/">we discussed hash codes</a> &#8211; <em>a small unique identifier for an item based on its properties or features</em>.</p>
<p>There are many different ways to calculate unique identifiers for items. These different ways are called <em>Hash Algorithms</em>. Each serves a different purpose, but some popular ones right now are are MD5, SHA1, and SHA256.</p>
<p>Why so many?</p>
<p>The reason is security. Our last post finished with the question:</p>
<blockquote><p><em>Using hash codes for simple content verification is one thing. But what if an attacker is trying to trick you with hash code collisions? For example, can you use that Visual Studio download if it’s from your worst enemy – but the hash code still matches? It depends on the algorithm!</em></p></blockquote>
<p>The security industry first started touching on the importance of “secure” hash algorithms in the 1970s. There were a flurry of proposals in the 80s that were immediately dismissed with security problems, but one called “<a href="http://en.wikipedia.org/wiki/MD5">MD5</a>” was introduced in the early 90s that seemed like it might last the test of time.</p>
<p>In 2004, however, advances in security research found issues in MD5 – thus “breaking MD5”. While you can still use MD5 just fine when security is not a concern, you cannot trust a version of Visual Studio from your enemy just because the MD5 hash value matches.</p>
<p>Here are the four features of an ideal <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function">cryptographic hash algorithm</a>:</p>
<ul>
<li>it is easy (but not necessarily quick) to compute the hash value for any given message</li>
<li>it is infeasible to generate a message that has a given hash</li>
<li>it is infeasible to modify a message without changing the hash</li>
<li>it is infeasible to find two different messages with the same hash</li>
</ul>
<p>If you get #2, then for the most part you get #3 and #4 automatically.</p>
<p>How does one “break” a hash algorithm? Let’s take a look a a few from the .NET Framework for an interesting exercise in reverse engineering.</p>
<p>As a background, every object in the .NET Framework supports a method called “<a href="http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx">GetHashCode()</a>”. It does a good job of returning a small random(ish) identifier for an object, so it is used primarily for putting objects into hash tables. This method returns a 32-bit integer, and is <strong><span style="text-decoration: underline;">not</span></strong> designed for security purposes:</p>
<blockquote><p><span style="font-family: Consolas;"><span style="line-height: normal; word-wrap: break-word; white-space: pre; word-break: break-all;"><span style="color: #0000ff;"><span style="font-size: 9.7pt;">public</span></span></span><span style="font-size: 9.7pt;"><span style="line-height: normal; word-wrap: break-word; white-space: pre; word-break: break-all;"><span style="color: #0000ff;">virtual</span></span><span style="line-height: normal; word-wrap: break-word; white-space: pre; word-break: break-all;"><span style="color: #0000ff;">int</span></span><span style="color: #000000;"> GetHashCode() </span></span></span></p></blockquote>
<p>The <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256.aspx">HashAlgorithm</a> class <strong><span style="text-decoration: underline;">is</span></strong> designed for security purposes, however, and should be used when security is a concern. We won’t use that class as an example, because if I can break that class in this blog, then it wouldn’t be in the .NET Framework!</p>
<h2>Breaking Int32</h2>
<p>Let’s see how this works on integers, and see how it would fare as a cryptographic hash algorithm:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; (1).GetHashCode()
1
PS &gt; (2).GetHashCode()
2
PS &gt; (1337).GetHashCode()
1337
PS &gt; (-1337).GetHashCode()
-1337</pre>
</blockquote>
<p>I think we see a pattern :) It looks like .NET is returning our input right back at us. It’s a sure way to prevent collisions, that’s for sure! If we open Int32.GetHashCode() in .NET Reflector (or ILSpy), we can see why:</p>
<blockquote><p><span style="font-family: Times New Roman;"><span style="line-height: normal;"><span style="color: #0000ff;"><strong><span style="font-size: 12pt;">public</span></strong></span></span><span style="font-size: 12pt;"><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #a52a2a;">override</span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #191970;"><strong>GetHashCode</strong></span></span></span></span><span style="font-family: Times New Roman;"><span style="font-size: 12pt;"><span style="color: #006400;"><span style="line-height: normal;">()</span> </span></span></span></p>
<p><span style="line-height: normal;">{</span></p>
<p><span style="color: #000000;">    </span><span style="line-height: normal;"><span style="color: #000080;">return</span></span><span style="color: #000000;"> <span style="line-height: normal;"><strong>this</strong></span></span><span style="color: #006400;"><span style="line-height: normal;">;</span> </span></p>
<p><span style="line-height: normal;"><span style="color: #006400; font-size: 12pt;">}</span></span></p></blockquote>
<p>The score sheet?</p>
<blockquote>
<table style="line-height: normal;">
<tbody>
<tr>
<td><span><span style="font-family: Times New Roman;"><span style="color: #008a00; font-size: 13.6pt;">☑</span></span></span></td>
<td><span style="font-family: Times New Roman;"><span style="color: #000000; font-size: 12pt;">it is easy to compute the hash value for any given message</span></span></td>
</tr>
<tr>
<td><span><span style="font-family: Times New Roman;"><span style="color: #8a0000; font-size: 13.6pt;">☒</span></span></span></td>
<td><span style="font-family: Times New Roman;"><span style="color: #000000; font-size: 12pt;">it is infeasible to generate a message that has a given hash</span></span></td>
</tr>
<tr>
<td><span><span style="font-family: Times New Roman;"><span style="color: #008a00; font-size: 13.6pt;">☑</span></span></span></td>
<td><span style="font-family: Times New Roman;"><span style="color: #000000; font-size: 12pt;">it is infeasible to modify a message without changing the hash</span></span></td>
</tr>
<tr>
<td><span><span style="font-family: Times New Roman;"><span style="color: #008a00; font-size: 13.6pt;">☑</span></span></span></td>
<td><span style="font-family: Times New Roman;"><span style="color: #000000; font-size: 12pt;">it is infeasible to find two different messages with the same hash</span></span></td>
</tr>
</tbody>
</table>
</blockquote>
<p>Not bad, but you can’t do much with just integers.</p>
<h2>Breaking Int64</h2>
<p>That wasn’t too challenging to break. What about Int64? That doesn’t fit in 32 bits by definition, so let’s see if there is any pattern:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; ([Int64] 1).GetHashCode()
1
PS &gt; ([Int64] 1337).GetHashCode()
1337
PS &gt; ([Int64] 12345678987654321).GetHashCode()
1656367333</pre>
</blockquote>
<p>For “low” numbers (below 32 bits?) it seems to be the same as the input number. After that, not quite sure. We can’t break this one by intuition. Let’s see the source:</p>
<blockquote><p><span style="font-family: Times New Roman;"><span style="line-height: normal;"><span style="color: #0000ff;"><strong><span style="font-size: 12pt;">public</span></strong></span></span><span style="font-size: 12pt;"><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #a52a2a;">override</span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #191970;"><strong>GetHashCode</strong></span></span></span></span><span style="font-family: Times New Roman;"><span style="font-size: 12pt;"><span style="color: #006400;"><span style="line-height: normal;">()</span> </span></span></span></p>
<p><span style="line-height: normal;">{</span></p>
<p><span style="color: #000000;">    </span><span style="line-height: normal;"><span style="color: #000080;">return</span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #006400;">(</span></span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="line-height: normal;"><span style="color: #006400;">)</span></span><span style="color: #000000;"><span style="line-height: normal;"><strong>this</strong></span> </span><span style="line-height: normal;"><span style="color: #006400;">^</span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #006400;">(</span></span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="line-height: normal;"><span style="color: #006400;">)(</span></span><span style="color: #000000;"><span style="line-height: normal;"><strong>this</strong></span> </span><span style="line-height: normal;"><span style="color: #006400;">&gt;&gt;</span></span><span style="color: #000000;"> </span><span style="line-height: normal;"><span style="color: #00008b;">32</span></span><span style="color: #006400;"><span style="line-height: normal;">);</span> </span></p>
<p><span style="line-height: normal;"><span style="color: #006400; font-size: 12pt;">}</span></span></p></blockquote>
<p>What the .NET Framework is doing here is pretty simple:</p>
<blockquote>
<table width="400" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="152"><span style="line-height: normal;"><span style="color: #006400;">(</span></span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="line-height: normal;"><span style="color: #006400;">)</span></span><span style="color: #000000;"><span style="line-height: normal;"><strong>this</strong></span> </span></td>
<td valign="top" width="248">Takes the lower 32-bits of the 64-bit number.</td>
</tr>
<tr>
<td valign="top" width="152"><span style="line-height: normal;"><span style="color: #006400;">(</span></span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="line-height: normal;"><span style="color: #006400;">)(</span></span><span style="color: #000000;"><span style="line-height: normal;"><strong>this</strong></span> </span><span style="line-height: normal;"><span style="color: #006400;">&gt;&gt;</span></span><span style="line-height: normal;"><span style="color: #00008b;">32</span></span><span style="color: #006400;"><span style="line-height: normal;">)</span></span></td>
<td valign="top" width="248">Shifts the number to the right by 32 places, and then takes the lower 32 bits of the number. That is the same thing as taking the upper 32 bits of the number.</td>
</tr>
<tr>
<td valign="top" width="152"><span style="line-height: normal;"><span style="color: #006400;">(</span></span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="line-height: normal;"><span style="color: #006400;">)</span></span><span style="color: #000000;"><span style="line-height: normal;"><strong>this</strong></span> </span><span style="line-height: normal;"><span style="color: #006400;">^</span></span><span style="line-height: normal;"><span style="color: #006400;">(</span></span><span style="line-height: normal;"><span style="color: #ff0000;"><strong>int</strong></span></span><span style="line-height: normal;"><span style="color: #006400;">)(</span></span><span style="color: #000000;"><span style="line-height: normal;"><strong>this</strong></span> </span><span style="line-height: normal;"><span style="color: #006400;">&gt;&gt;</span></span><span style="line-height: normal;"><span style="color: #00008b;">32</span></span><span style="color: #006400;"><span style="line-height: normal;">)</span></span></td>
<td valign="top" width="248">Uses the binary XOR operator to combine the upper 32 bits and the lower 32 bits.</td>
</tr>
</tbody>
</table>
</blockquote>
<p>The first row explains why all of our “low” numbers seemed to just return themselves. The low numbers were the lower 32 bits, and there were no upper 32 bits.</p>
<p>Let’s take a look at:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">
PS &gt; ([Int64] 12345678987654321).GetHashCode()
1656367333</pre>
</blockquote>
<p>If we convert this to the upper and lower 32 bits, we get:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; [Convert]::ToString(12345678987654321, 2)
101011110111000101010001100010100100011111010010110001
PS &gt; [Convert]::ToString(12345678987654321, 2).PadLeft(64, "0")
0000000000101011110111000101010001100010100100011111010010110001</pre>
</blockquote>
<p>Now, split them into the top and bottom 32 bits take the <a href="http://www.xcprod.com/titan/XCSB-DOC/binary_xor.html">binary exclusive OR</a> (either bit is 1, but not both):</p>
<blockquote>
<table width="400" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="78">Upper 32</td>
<td valign="top" width="322">00000000001010111101110001010100</td>
</tr>
<tr>
<td valign="top" width="78">Lower 32</td>
<td valign="top" width="322">01100010100100011111010010110001</td>
</tr>
<tr>
<td valign="top" width="78">XOR</td>
<td valign="top" width="322">01100010101110100010100011100101</td>
</tr>
</tbody>
</table>
</blockquote>
<p>Taking a look at the final result, it looks like we have the same as what .NET gave us:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">
PS &gt; [Convert]::ToInt32("01100010101110100010100011100101", 2)
1656367333

PS &gt; ([Int64] 12345678987654321).GetHashCode()
1656367333</pre>
</blockquote>
<p>Now that we understand the algorithm, let’s see how we might break the strongest guarantee of a hash algorithm – namely, “<em>it is infeasible to generate a message that has a given hash</em>.”</p>
<p>Let’s pretend we want to generate a 64-bit number with the hash value of <strong>1337. </strong>That has the following binary value:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; [Convert]::ToString(1337, 2).PadLeft(32, "0")
00000000000000000000010100111001</pre>
</blockquote>
<p>Since the 64-bit hash is generated by combining the upper and lower halves of the number, the simplest way is to simply ignore the upper 32 bits:</p>
<blockquote>
<table width="402" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="78">Upper 32</td>
<td valign="top" width="322">00000000000000000000000000000000</td>
</tr>
<tr>
<td valign="top" width="78">Lower 32</td>
<td valign="top" width="322">00000000000000000000010100111001</td>
</tr>
<tr>
<td valign="top" width="78">XOR</td>
<td valign="top" width="322">00000000000000000000010100111001</td>
</tr>
</tbody>
</table>
</blockquote>
<p>That was simple enough. What about breaking the next strongest feature: “<em>it is infeasible to find two different messages with the same hash.</em>”</p>
<p>Given that we know how to find an Int64 for any given hash value, how can we find <em>multiple</em> Int64s that have the same hash value?</p>
<p>To figure this out, we’ll use a trick from the XOR operation frequently used in <a href="http://en.wikipedia.org/wiki/XOR_cipher">XOR cyphers and XOR encryption</a>:</p>
<blockquote><p><em>If A XOR B = C</p>
<p>Then A = B XOR C </em></p>
<p>And B = A XOR C</p></blockquote>
<p>If we pretend that A is the upper 32 bits of a number, B is the lower 32 bits of a number, and C is the hash code, then we have the following options:</p>
<blockquote><p>Upper 32 bits = (Lower 32 bits) XOR (Hash code)</p>
<p>or</p>
<p>Lower 32 bits = (Upper 32 bits) XOR (Hash code)</p></blockquote>
<p>Given that, here’s all we have to do to find a number with a specific hash code:</p>
<ul>
<li>Pick an arbitrary number for the lower (or upper) 32 bits</li>
<li>XOR it with the hash code</li>
<li>The result will be the other 32 bits you need</li>
</ul>
<p>Let’s look at an example, using 10001011001010110101101011010111 as a randomly-chosen number:</p>
<blockquote>
<table width="402" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="120">Upper 32</td>
<td valign="top" width="280">10001011001010110101101011010111</td>
</tr>
<tr>
<td valign="top" width="120">Hash Code</td>
<td valign="top" width="280">00000000000000000000010100111001</td>
</tr>
<tr>
<td valign="top" width="120">XOR (= Lower 32)</td>
<td valign="top" width="280">?</td>
</tr>
</tbody>
</table>
</blockquote>
<p>PowerShell has the “-bxor” operator, so let’s make this easier on ourselves:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; $upper32 = [Convert]::ToInt32("10001011001010110101101011010111", 2)
PS &gt; $hash = [Convert]::ToInt32("00000000000000000000010100111001", 2)
PS &gt; $lower32 = $upper32 -bxor $hash
PS &gt; [Convert]::ToString($lower32, 2)
10001011001010110101111111101110</pre>
</blockquote>
<p>So now we have a hash collision – let’s be sure:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; $number = [Convert]::ToInt64(
&gt;&gt;     "10001011001010110101101011010111" +
&gt;&gt;     "10001011001010110101111111101110", 2)
&gt;&gt;
PS &gt; $number
-8418535196639666194</pre>
</blockquote>
<p>Let’s see:</p>
<blockquote>
<pre style="background-color: #012456; font-family: 'Lucida Console'; color: #f0edee;">PS &gt; ([Int64] -8418535196639666194).GetHashCode()
1337</pre>
</blockquote>
<p>Bingo. We can now generate hash collisions for arbitrary hash codes. What does that mean?</p>
<blockquote>
<table>
<tbody>
<tr>
<td><span style="color: #008a00; font-size: larger;">☑</span></td>
<td>it is easy to compute the hash value for any given message</td>
</tr>
<tr>
<td><span style="color: #8a0000; font-size: larger;">☒</span></td>
<td>it is infeasible to generate a message that has a given hash</td>
</tr>
<tr>
<td><span style="color: #8a0000; font-size: larger;">☒</span></td>
<td>it is infeasible to modify a message without changing the hash</td>
</tr>
<tr>
<td><span style="color: #8a0000; font-size: larger;">☒</span></td>
<td>it is infeasible to find two different messages with the same hash</td>
</tr>
</tbody>
</table>
</blockquote>
<p><strong>Bonus question</strong>: <em>how many hash collisions can you generate for a given hash code? And how might you do so systematically?</em></p>
<p>Chew on that a bit – in our next post, we’ll take a crack at reverse-engineering <strong>String.GetHashCode()</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/11/06/breaking-hash-codes-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubisoft Rocksmith Review</title>
		<link>http://www.leeholmes.com/blog/2011/10/26/ubisoft-rocksmith-review/</link>
		<comments>http://www.leeholmes.com/blog/2011/10/26/ubisoft-rocksmith-review/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 08:49:33 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/10/26/ubisoft-rocksmith-review/</guid>
		<description><![CDATA[On Tuesday of last week, Ubisoft released Rocksmith: an XBOX / PS3 / PC guitar game with a twist. You play a real guitar. You learn the real notes. Your fingers hurt just like every great guitarist before you. &#160; For some context, guitar has been part of my life for a long time – [...]]]></description>
			<content:encoded><![CDATA[<p>On Tuesday of last week, Ubisoft released <a href="http://rocksmith.ubi.com/rocksmith/en-US/home/">Rocksmith</a>: an <a href="http://www.amazon.com/s?ie=UTF8&amp;x=0&amp;ref_=nb_sb_noss&amp;y=0&amp;field-keywords=rocksmith&amp;url=search-alias%3Daps&amp;_encoding=UTF8&amp;tag=preciscomput-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=390957">XBOX / PS3 / PC guitar game</a> with a twist.</p>
<p align="center">You play a real guitar.</p>
<p align="center">You learn the real notes.</p>
<p align="center">Your fingers hurt just like every great guitarist before you.</p>
<p align="center">&#160;</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image1.png" width="504" height="281" /></p>
<p>For some context, guitar has been part of my life for a long time – although my proficiency with it has waxed and waned (currently waning). I made the most progress with classical guitar, but ran into a cliff of frustration when songs started calling for notes out of the basic first few positions. A couple of editions of the PowerShell Cookbook will put a dent in your free time, so that may have something to do with it, too :)</p>
<p>This kind of “Guitar Hero but with real guitar” game has been a pipe dream for a long time. A few years ago, the <a href="http://en.wikipedia.org/wiki/Guitar_Wizard#Guitar_Wizard">Music Wizard</a> folks started shopping around a new game called “Guitar Wizard”. After hearing about it, I promptly signed up for their mailing list &#8211; but they’ve now removed all of the product pages from their site and I suspect have abandoned the project entirely.</p>
<p>The primary reason behind this lack of advancement in the field has long been technical. Most software that tries to convert raw guitar sounds into something that a computer can understand ends up failing pretty fast. The note recognition ends up being glitchy, inaccurate, and frustrating. Things have heated up recently, with applications like <a href="http://plus.ultimate-guitar.com/jamguru/">JamGuru</a> (PC) and <a href="http://rockprodigy.com/">Rock Prodigy</a> (iPad) that help you learn the tablature versions of songs through sophisticated note recognition. </p>
<p>Rock Band 3 introduced “Pro Mode” for guitar (which has been getting good reviews), but there have been mixed feelings about the way the guitar interface is presented. Also, they took another approach to resolving the technical issues by making you use their specific guitar. That second point really hurts if you have a well-loved (or unloved!) guitar already.</p>
<p>While computer scientists are out flogging and publishing minor advances in audio recognition, Rocksmith and this new breed of apps have somehow just quietly and magically <a href="http://www.xkcd.com/664/">figured it out, and shipped it</a>. The note recognition truly does feel magical, and never crosses your mind after that.</p>
<p>After getting a brief intro on how to use the system, Rocksmith starts you off with a simple lead part to “(I Can’t Get No) Satisfaction” by the Rolling Stones.</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image2.png" width="488" height="220" /></p>
<h2>It’s really you</h2>
<p>At even its simplest levels, you truly feel like you’re playing the song. This is where Rocksmith stands out as a music game. In rhythm games like Rock Band, you use the guitar controller (or real guitar) to hit the right notes at the right time. As long as you do that correctly, the game continues to replace you with the pre-recorded guitar track of the song. If you make a mistake, it replaces you with a squelchy sound of a guitar mistake. What kind of mistake, you might ask? Were you off by a fret? Too late? Too early? Who knows!</p>
<p>Rocksmith, on the other hand, plays the actual sounds from your guitar. They send it through a virtual amplifier and effects chain so that you have the same tone as the guitar from the original song, but you’ll hear it immediately if you’re off by a fret. The note will sound too high or low (just as it does in real guitar), so you can easily correct by ear alone.</p>
<h2>Don’t be afraid to experiment</h2>
<p>If you’ve played other rhythm games like Rock Band, you’ve probably looked down the “Note Highway” with dread as 2 minutes of the same boring pattern approach.</p>
<p>Rocksmith solves this problem wonderfully. Want to noodle around for the beginning of the song? Add some trills, double-plucks or experimental harmonies? Go ahead! Rocksmith doesn’t penalize you for these – as long as you still at least hit the notes that it’s displayed.</p>
<p>Speaking of noodling around, Rocksmith has the best load screen I’ve ever seen. It activates the virtual amp whenever it’s “Loading…”, so you can take that time to warm up, play around, or experiment with new ideas.</p>
<p>As I mentioned earlier, Rocksmith creates your in-game sound by sending your guitar through a virtual amplifier and effects chain. Once you start completing songs, Rocksmith makes these components available to you in a free-form playground called “Amp Mode”. You can pick pre-set sounds from any of the songs you earned them from, or mix and match components (pedals, amps, etc.) to make something completely different. Spend a minute, spend an hour, either way you’ll have fun.</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image3.png" width="504" height="277" /></p>
<h2>You learn actual guitar</h2>
<p>After playing the songs for awhile, you’ll amaze yourself by picking up the guitar when it’s not even plugged in. You’ll play the same thing you’ve been playing all along, but then realize the sounds of the song are coming from your <em>guitar</em>, not your <em>video game</em>. They don’t include <a href="http://www.youtube.com/watch?v=FOt3r_aNNxE">Stairway to Heaven</a> in the song list, so you’ll be safe playing these at the local guitar shop, too!</p>
<p>After you’ve been playing songs for a while, Rocksmith opens up a handful of guitar trainers / challenge games. These games let you practice specific techniques (chords, scales, neck position, bends) that improve your actual guitar skill, as well as in-game performance.</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image4.png" width="504" height="276" /></p>
<p>So, far I’ve only unlocked two challenge games: Ducks (which teaches you how to find fret positions quickly) and Dawn of the Chordead (which teaches you to play and recall chords). Dawn of the Chordead unquestionably teaches you transferrable guitar skills. Being able to quickly find and play a chord (and then smoothly transition to the next one) is crucial for playing many songs. Ducks makes you a much better <em>game</em> player, but offers limited benefit for <em>real</em> guitar (see My One Big Complaint).</p>
<h2></h2>
<h2>What’s not to like?</h2>
<p>While I’m a big fan of the game, there are some rough edges. First off, you need to use your regular game controller to navigate through the game. When you’ve got a guitar strapped around your neck and the wireless controllers are going to sleep, this is just annoying. Why you can’t just use the guitar to control the entire game is beyond me – Rocksmith has already proven that it can accurately recognize input from a real guitar!</p>
<p>Second is practice mode. When a song starts to prove challenging, they offer a neat set of trainers that let you just practice through a difficult section. These trainers let you gradually increase difficulty or speed for a specific section. It would be nice if there was a more holistic practice mode that let you master a song section-by-section by increasing difficulty and then speed for each section. What’s most annoying about the practice mode is that you’ve got five “lives”. If you can’t play it fast enough or accurately enough in five attempts, then it kicks you back to the practice screen. From there, you have to click through all the menus, loading screen, tuning process, etc. It’s just a lot of process for something that should be the most forgiving in the entire game.</p>
<h3>My One Big Complaint</h3>
<p>My One Big Complaint stems from wanting the skills from the game to have more benefit to my real guitar playing.</p>
<p>As I mentioned before, guitar mastery is heavily influenced by how well you know the fretboard. To show you where to put your fingers when you play, Rocksmith sends fret numbers down the Note Highway:</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image5.png" width="504" height="252" /></p>
<p>This is very similar to Guitar tablature, and is a great way to learn a song. The alternative is the traditional music staff, which even professional musicians have difficulty sight-reading and would be a deal breaker for the game.</p>
<p>However, becoming a lightning-fast tablature reader hits a dead-end at some point. It’s like becoming a god at watercolour paint-by-numbers. Just as you need to learn to draw and choose pigment at some point while becoming an artist, a guitarist will eventually need to know what notes they are playing (C,D,E, etc.) On this point, Rocksmith misses a great opportunity. If they simply offered an option to replace the coloured blocks with coloured letters (i.e.: yellow on the 5th fret = D), they’d unlock a vast world of <em>true musicianship</em> to millions of fledgling guitarists. Rock Prodigy offers this in their interface, and it help immensely:</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image6.png" width="504" height="279" /></p>
<p>&#160;</p>
<h2>I bought it, and would buy it again</h2>
<p>When you add up all the pros and cons, there isn’t really a question in my mind. If my cat ate the game tonight, I would buy it again tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/10/26/ubisoft-rocksmith-review/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Morser &#8211; Keyboard Morse Input Device</title>
		<link>http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/</link>
		<comments>http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 05:50:01 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/</guid>
		<description><![CDATA[[Download: Morser.zip, 155kb] [Updated 10/04/2011 – V2 includes support for audio input] &#160; If you’re interested in Morse Code as a hobby or just as a neat lo-fi communication mechanism, one thing that might set you back is the lack of practical opportunities to use it. You can find lots of Morse Code apps that [...]]]></description>
			<content:encoded><![CDATA[<p>[Download: <a href="http://www.leeholmes.com/projects/morser/Morser.zip">Morser.zip</a>, 155kb]</p>
<p><em>[Updated 10/04/2011 – V2 includes support for audio input]</em></p>
<p>&#160;</p>
<p>If you’re interested in Morse Code as a hobby or just as a neat lo-fi communication mechanism, one thing that might set you back is the lack of practical opportunities to use it.</p>
<p>You can find lots of Morse Code apps that let you practice into a little text box, but nothing that you can tweet with, blog with chat with, etc.</p>
<p>Morser is a simple little program that solves this need.</p>
<p><a href="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="image" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/10/image_thumb.png" width="341" height="484" /></a></p>
<p>After launching it, press Control-Alt-M to enable or disable it. It works no matter what application you have running, so you can minimize it and switch to an application that you want to use it with. When enabled, Morser acts as a straight keyer. It listens for presses of your keyboard’s down arrow and automatically types the letter that corresponds to your Morse code input.</p>
<p>If you hook up any audio device (i.e.: a real actual keyer) to an input jack, Morser converts the audio input to text as well.</p>
<p>If you have funny characters to enter, just type them on your keyboard as you normally would.</p>
<p>The Control-Alt-M hotkey also works in any application, so you don’t need to switch back to Morser to enable or disable it.</p>
<p>Here’s an example of it interpreting somebody’s YouTube video. I hooked my audio output to my Mic Input.</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:9548fc86-1aee-41af-8430-a31bc99fd090" class="wlWriterEditableSmartContent" style="width: 448px; float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px auto; display: block; padding-right: 0px">
<div><object width="448" height="252"><param name="movie" value="http://www.youtube.com/v/pDLvAwEEszM?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/pDLvAwEEszM?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div>
</div>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerShell Wallpapers</title>
		<link>http://www.leeholmes.com/blog/2011/09/26/powershell-wallpapers/</link>
		<comments>http://www.leeholmes.com/blog/2011/09/26/powershell-wallpapers/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 16:27:49 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/?p=332</guid>
		<description><![CDATA[Shay Levy, one of our great MVPs, has been crafting sweet PowerShell desktop backgrounds for years now. One thing I&#8217;ve always loved is that they seem to carry a message. His first wallpaper was a screaming crowd. In my head, they are people chanting for the power of PowerShell, or the IT rock star that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.microsoft.co.il/blogs/ScriptFanatic/">Shay Levy</a>, one of our great MVPs, has been crafting sweet PowerShell desktop backgrounds for years now. One thing I&#8217;ve always loved is that they seem to carry a message.</p>
<p>His first wallpaper was a screaming crowd. In my head, they are people chanting for the power of PowerShell, or the IT rock star that saved the deployment. It&#8217;s been my background since he posted it, and has graced many a conference presentation.</p>
<p>He&#8217;s just created another two with a Superman theme. It makes me think of a bunch of out-of-date<br />
systems out there needing automation &#8211; so the PowerShell IT admin superhero kicks into action :)</p>
<p><a href="http://www.leeholmes.com/blog/wp-content/uploads/2011/09/superman_wallpaper_small.png"><img class="size-full wp-image-333 aligncenter" title="superman_wallpaper_small" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/09/superman_wallpaper_small.png" alt="" width="488" height="302" /></a></p>
<p>&nbsp;</p>
<p>Check out his post on the <a href="http://www.powershellmagazine.com/2011/09/23/powershell-wallpapers/">PowerShell Magazine site</a> for the full resolution downloads!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/09/26/powershell-wallpapers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing for an International Audience</title>
		<link>http://www.leeholmes.com/blog/2011/09/08/developing-for-an-international-audience/</link>
		<comments>http://www.leeholmes.com/blog/2011/09/08/developing-for-an-international-audience/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 04:23:32 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/?p=328</guid>
		<description><![CDATA[One aspect of software development (scripting included) that burns every single developer is developing for an international audience. The most common cause of problems come from incorrect handling of dates and numbers, but there are many more. I first cut my teeth on the topic when working on Encarta Online, via bugs teaching me the [...]]]></description>
			<content:encoded><![CDATA[<p>One aspect of software development (scripting included) that burns <em>every single developer</em> is developing for an international audience. The most common cause of problems come from incorrect handling of dates and numbers, but there are many more.</p>
<p>I first cut my teeth on the topic when working on Encarta Online, via bugs teaching me the hard way! After that, I took some time to read the excellent documentation on MSDN that describes many of the intricacies: <a title="Developing World-Ready Applications" href="http://msdn.microsoft.com/en-us/library/h6270d0z%28v=VS.71%29.aspx">Developing World-Ready Applications</a>, and especially <a href="http://msdn.microsoft.com/en-us/library/w7x1y988.aspx">Best Practices for Developing World-Ready Applications</a>.</p>
<p>Of course, these principles don&#8217;t just apply to C# software developers. They apply equally well to PowerShell scripters! While PowerShell handles most of the complexity for you, there are some important things to be aware of. &#8220;Write Culture-Aware Scripts&#8221; in Chapter 13 of the PowerShell Cookbook describes the issues around writing world-ready PowerShell scripts.</p>
<p>If you REALLY want to understand some of the crazy issues in international software development, Michael Kaplan has a great MSDN blog to follow: <a href="http://blogs.msdn.com/b/michkap/">Sorting it all Out</a>.</p>
<p>Now, once you think you&#8217;ve got it all down, consider this harmless form that anybody might add to an application:</p>
<blockquote><p>First Name: ___________________<br />
Last Name: ___________________</p></blockquote>
<p>If you&#8217;re writing this for an international audience, you&#8217;re going to alienate and confuse a huge portion of your audience. This W3C Internationalization document describes the problem with amazing clarity: <a href="http://www.w3.org/International/questions/qa-personal-names">Personal names around the world</a>. As Reddit so clearly puts it, &#8220;If you&#8217;re asking for a first and last name, you&#8217;re doing it wrong!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/09/08/developing-for-an-international-audience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enforcing Single-User Access to PowerShell Remoting</title>
		<link>http://www.leeholmes.com/blog/2011/08/24/enforcing-single-user-access-to-powershell-remoting/</link>
		<comments>http://www.leeholmes.com/blog/2011/08/24/enforcing-single-user-access-to-powershell-remoting/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 07:08:07 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/08/24/enforcing-single-user-access-to-powershell-remoting/</guid>
		<description><![CDATA[I got a question today with an interesting request – “How do I ensure that only one user can access a machine via PowerShell Remoting at a time?” We do have direct functionality to limit multiple sessions, but it that limit applies to sessions by the same user &#8211; see: MaxShellsPerUser for full detail about [...]]]></description>
			<content:encoded><![CDATA[<p>I got a question today with an interesting request – “How do I ensure that only one user can access a machine via PowerShell Remoting at a time?”</p>
<p>We do have direct functionality to limit multiple sessions, but it that limit applies to sessions by the same user &#8211; see: <a href="http://blogs.msdn.com/b/powershell/archive/2010/05/03/configuring-wsman-limits.aspx">MaxShellsPerUser</a> for full detail about that setting. If you are doing some sort of self-service portal where everybody shares the same local username / password, MaxShellsPerUser is one way to solve the problem.</p>
<p>More commonly, though, you might want to enforce this restriction across all users on the machine. One useful thing to configure then is MaxConcurrentUsers. Set MaxConcurrentUsers = 1 and MaxShellsPerUser = 1, and you’ve enforced single-user access.</p>
<p>If your needs are more complex than this, we can solve this with a custom PowerShell session configuration. Perhaps we’d like to offer unrestricted access to administrators on the (default) Microsoft.PowerShell configuration, but enforce throttling on a new one called “Contoso.Build”.</p>
<p>If you’ve never set up a custom session configuration before, there are many great resources. Ravikanth Chaganti, one of our awesome MVPs, has written a great introduction to them here:</p>
<ul>
<li><a title="http://www.ravichaganti.com/blog/?p=1200" href="http://www.ravichaganti.com/blog/?p=1200">http://www.ravichaganti.com/blog/?p=1200</a></li>
<li><a title="http://www.ravichaganti.com/blog/?p=1208" href="http://www.ravichaganti.com/blog/?p=1208">http://www.ravichaganti.com/blog/?p=1208</a></li>
</ul>
<p>This is also covered in the PowerShell Cookbook, recipe 29.20.</p>
<p>Now, once you’ve got a startup script for your custom session configuration, you can use a system-wide <a href="http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx">Named Mutex</a> to enforce your quota limits. This is pretty advanced scripting, so don’t be worried if it looks intimidating.</p>
<blockquote><table style="line-height: normal; margin-left: 32.25pt; mso-cellspacing: 0in; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
<td style="padding-bottom: 3.75pt; padding-left: 3.75pt; padding-right: 3.75pt; padding-top: 3.75pt" valign="top">
<p style="margin: 0in 0in 0pt; background: #cecece" class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 10pt" color="#000000">001                   <br />002                    <br />003                    <br />004                    <br />005                    <br />006                    <br />007                    <br />008                    <br />009                    <br />010                    <br />011                    <br />012                    <br />013                    <br />014                    <br />015                    <br />016                    <br />017                    <br />018                    <br />019                    <br />020                    <br />021                    <br />022                    <br />023                    <br />024                    <br />025</font></font></span></p>
</td>
<td style="padding-bottom: 3.75pt; padding-left: 3.75pt; padding-right: 3.75pt; padding-top: 3.75pt" valign="top" nowrap="nowrap">
<p style="margin: 0in 0in 0pt; background: #fcfcfc" class="MsoNormal"><font face="Consolas"><span style="font-family: ; color: "><font color="#00008b"><font style="font-size: 10pt">function</font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#000000">&#160;</font></span><span style="font-family: ; color: "><font color="#8a2be2">IsMachineIdle</font></span></font></font><span style="font-family: "><font style="font-size: 10pt">                 <br /><font face="Consolas"><font color="#000000"><span style="color: ">{</span>                      <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$sessionHandle</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">New-Object</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">System.Threading.Mutex</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$false</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#8b0000">&quot;PowerShellSessionMutex&quot;</font></span>                    <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#ff4500">$isAvailable</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$false</font></span>                    </p>
<p><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#00008b">try</font></span>                    <br /></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;&#160;&#160; {</span>                      <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$isAvailable</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$sessionHandle</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">WaitOne(</font></span><span style="color: "><font color="#800080">1000</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">)</span>                      <br /><span style="color: ">&#160;&#160;&#160; }</span>                      <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#00008b">catch</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#008080">[System.Threading.AbandonedMutexException]</font></span>                    <br /></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;&#160;&#160; {</span>                      <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$isAvailable</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$true</font></span>                    <br /></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;&#160;&#160; }</span>                      </p>
<p><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$isAvailable</font></span>                    <br /><span style="color: "><font color="#000000">}</font></span>                    </p>
<p><span style="color: "><font color="#00008b">if</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#a9a9a9">-not</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">IsMachineIdle</font></span></font></font><font face="Consolas"><font style="font-size: 10pt"><font color="#000000"><span style="color: ">)</span>                      <br /><span style="color: ">{</span>                      <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#8b0000">&quot;Sorry, the machine is in use. Try again in 5 minutes.&quot;</font></span>                    <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#00008b">exit</font></span>                    <br /><span style="color: "><font color="#000000">}</font></span>                    </p>
<p><span style="color: "><font color="#006400">## Continue on with preparing a session</font></span><font color="#000000"> </font></font></font></span></p>
</td>
</tr>
</tbody>
</table>
</blockquote>
<p>If you want to get more advanced (saying who is logged on, etc.), roll up your sleeves and dig in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/08/24/enforcing-single-user-access-to-powershell-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Organizational Awareness with PowerShell</title>
		<link>http://www.leeholmes.com/blog/2011/06/24/organizational-awareness-with-powershell/</link>
		<comments>http://www.leeholmes.com/blog/2011/06/24/organizational-awareness-with-powershell/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 07:36:46 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/06/24/organizational-awareness-with-powershell/</guid>
		<description><![CDATA[One of the things that’s always unsettled me a bit in a big organization is keeping yourself informed about changes that you care about, even when those changes never end up making it through the grape vine. For example: Promotions. Of course you want to congratulate them! Transfers. Finding out that a team has moved [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that’s always unsettled me a bit in a big organization is keeping yourself informed about changes that you care about, even when those changes never end up making it through the grape vine. For example:</p>
<ul>
<li>Promotions. Of course you want to congratulate them! </li>
<li>Transfers. Finding out that a team has moved to another manager, but no “re-org” mail to let you know. </li>
<li>Leaving the company. Finding out that a co-worker has left the company or division. </li>
</ul>
<p>Naturally, PowerShell is here to save the day! I’ve been running a script I call “OrgDiff” as a scheduled task now for a long time – it came about organically, and I look forward to its results every Monday.</p>
<p>Here a couple of great examples of a few little bits of code (75 lines) coming together to make something of surprising utility.</p>
<div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; line-height: normal; padding-left: 5px; width: 650px; padding-right: 5px; font-family: ; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: ; background: #cecece; padding-top: 5px"><font face="Consolas"><font style="font-size: 10pt" color="#000000">001                 <br />002                  <br />003                  <br />004                  <br />005                  <br />006                  <br />007                  <br />008                  <br />009                  <br />010                  <br />011                  <br />012                  <br />013                  <br />014                  <br />015                  <br />016                  <br />017                  <br />018                  <br />019                  <br />020                  <br />021                  <br />022                  <br />023                  <br />024                  <br />025                  <br />026                  <br />027                  <br />028                  <br />029                  <br />030                  <br />031                  <br />032                  <br />033                  <br />034                  <br />035                  <br />036                  <br />037                  <br />038                  <br />039                  <br />040                  <br />041                  <br />042                  <br />043                  <br />044                  <br />045                  <br />046                  <br />047                  <br />048                  <br />049                  <br />050                  <br />051                  <br />052                  <br />053                  <br />054                  <br />055                  <br />056                  <br />057                  <br />058                  <br />059                  <br />060                  <br />061                  <br />062</font></font>              </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: ; background: #fcfcfc; padding-top: 5px"><font face="Consolas"><span style="color: "><font color="#00008b"><font style="font-size: 10pt">param</font></font></span><font style="font-size: 10pt"><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$User</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&#8216;mybigboss&#8217;</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$Limit</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#008080">[Int32]</font></span><span style="color: "><font color="#a9a9a9">::</font></span><span style="color: "><font color="#000000">MaxValue</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#008080">[Switch]</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$IncludeManager</font></span><span style="color: "><font color="#000000">)</font></span>                  </p>
<p><span style="color: "><font color="#ff4500">$depth</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#800080">0</font></span>                  </p>
<p></font></font><font style="font-size: 10pt"><font face="Consolas"><font color="#006400"><span style="color: ">## A list of all the domains that you want to search for</span>                    <br /><span style="color: ">## a given user&#8217;s alias. Try to organize them in order</span>                    <br /><span style="color: ">## of popularity so that your script runs as quick as possible.</span></font>                  <br /><span style="color: "><font color="#ff4500">$domains</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;LDAP://DC=domain1,DC=corp,DC=contoso,DC=com&quot;</font></span><span style="color: "><font color="#a9a9a9">,</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#8b0000">&quot;LDAP://DC=vendors,DC=corp,DC=contoso,DC=com&quot;</font></span><span style="color: "><font color="#a9a9a9">,</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#8b0000">&quot;LDAP://DC=international,DC=corp,DC=contoso,DC=com&quot;</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span>                  <br /><span style="color: "><font color="#006400">## Find all of the direct reports for a given user</font></span>                  <br /><span style="color: "><font color="#00008b">function</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">GetReports</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$username</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$depth</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">)</span>                    <br /><span style="color: ">{</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#00008b">if</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#a9a9a9">-not</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$username</font></span><font color="#000000"><span style="color: ">)</span><span style="color: ">&#160;</span><span style="color: ">{</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#00008b">return</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">}</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#00008b">if</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$depth</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">-gt</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$Limit</font></span><font color="#000000"><span style="color: ">)</span><span style="color: ">&#160;</span><span style="color: ">{</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#00008b">return</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">}</span>                    </p>
<p><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#006400">## Go through all of the domains and try to find the user</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#006400">## account in that domain </font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#00008b">foreach</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$domain</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#00008b">in</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$domains</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">)</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">{</span>                    <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$adsi</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#008080">[ADSI]</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$domain</font></span>                  </p>
<p><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#ff4500">$searcher</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">New-Object</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">System.DirectoryServices.DirectorySearcher</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$adsi</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#ff4500">$searcher</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">Filter</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;(&amp;(objectClass=User)(mailnickname=$username))&quot;</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#ff4500">$user</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$searcher</font></span><span style="color: "><font color="#a9a9a9">.</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">FindOne</span><span style="color: ">(</span><span style="color: ">)</span>                    <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>                    <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#00008b">if</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$user</font></span><font color="#000000"><span style="color: ">)</span><span style="color: ">&#160;</span><span style="color: ">{</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#00008b">break</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">}</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">}</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span>                    <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#00008b">if</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#a9a9a9">-not</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$user</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">)</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">{</span>                    <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#0000ff">Write-Error</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;Could not find $username&quot;</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#00008b">return</font></span>                  <br /></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">}</span>                    </p>
<p><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#006400">## If we want the report to include information about the user&#8217;s manager,</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#006400">## prepare that portion of the output.</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#00008b">if</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$IncludeManager</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">)</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">{</span>                    <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$manager</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot; &#8211; &quot;</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">+</font></span>                  <br /><font color="#000000"><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: ">(</span><span style="color: ">(</span></font><span style="color: "><font color="#ff4500">$user</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Properties</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">manager</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">-split</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&#8216;,&#8217;</font></span><span style="color: "><font color="#000000">)</font></span><span style="color: "><font color="#a9a9a9">[</font></span><span style="color: "><font color="#800080">0</font></span><span style="color: "><font color="#a9a9a9">]</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">-replace</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&#8216;CN=&#8217;</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#8b0000">&#8221;</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">)</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">}</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span>                    <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#006400">## Display the user&#8217;s name, alias, title, and (optionally) manager -</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#006400">## indented according to how deep we&#8217;re investigating</font></span>                  <br /><font color="#000000"><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">(</span></font><span style="color: "><font color="#8b0000">&quot; &quot;</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">*</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">(</span></font><span style="color: "><font color="#ff4500">$depth</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">*</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#800080">2</font></span><font color="#000000"><span style="color: ">)</span><span style="color: ">)</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">+</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$user</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Properties</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">name</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">+</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#8b0000">&quot; (&quot;</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">+</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$user</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Properties</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">mailnickname</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">+</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#8b0000">&quot;) &#8211; $($user.Properties.title)$manager&quot;</font></span>                  <br /></font><font face="Consolas"><font color="#000000"><span style="color: ">&#160;&#160;&#160; </span>                    <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$depth</font></span><span style="color: "><font color="#a9a9a9">++</font></span>                  </p>
<p><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#006400">## If the user has direct reports, call this function again to show</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#006400">## their portion of the organization.</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#00008b">foreach</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$directReport</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#00008b">in</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">@(</span></font><span style="color: "><font color="#ff4500">$user</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Properties</font></span><span style="color: "><font color="#a9a9a9">.</font></span></font><font face="Consolas"><font color="#000000"><span style="color: ">directreports</span><span style="color: ">)</span><span style="color: ">)</span>                    <br /><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">{</span>                    <br /><span style="color: ">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></font><span style="color: "><font color="#ff4500">$report</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#008080">[ADSI]</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;GC://$directReport&quot;</font></span>                  <br /><span style="color: "><font color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="color: "><font color="#0000ff">GetReports</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">(</span></font><span style="color: "><font color="#ff4500">$report</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">mailNickname</span><span style="color: ">)</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#ff4500">$depth</font></span>                  <br /></font></font><font face="Consolas"><font style="font-size: 10pt"><font color="#000000"><span style="color: ">&#160;&#160;&#160; </span><span style="color: ">}</span>                    <br /><span style="color: ">}</span></font>                  </p>
<p><span style="color: "><font color="#0000ff">GetReports</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$user</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$depth</font></span><font color="#000000"> </font></font></font></div>
</td>
</tr>
</tbody>
</table></div>
<p>Normal output looks like this:</p>
<blockquote><p><font face="Courier New">Some Body (somebody) &#8211; GENERAL MANAGER        <br />&#160; Jeffrey Snover (jsnover) &#8211; DISTINGUISHED ENGINEER         <br />&#160; Cool Person (coolbeans) &#8211; BUSINESS ADMINISTRATOR         <br />&#160; Super Developer (superdev) &#8211; DIRECTOR OF DEVELOPMENT         <br />&#160;&#160;&#160; Dev Manager (devmgr) &#8211; DEVELOPMENT MANAGER         <br />&#160;&#160;&#160;&#160;&#160; Dev Lead (devlead) _ DEVELOPMENT LEAD         <br />&#160;&#160;&#160; Dev Manager2 (devmgr2) &#8211; DEVELOPMENT MANAGER         <br />(etc)         <br /></font></p>
</blockquote>
<p>Now, if you run a weekly script to generate this report into a text file on your hard drive, you can use PowerShell to compare last week’s file with this week’s file. However, when we just compare files line-by-line, you’ll lose the indentation – and therefore the context of who their manager is. That leads to the need for the “-IncludeManager” switch, which generates output more like this:</p>
<blockquote><p><font face="Courier New">Some Body (somebody) &#8211; GENERAL MANAGER        <br />&#160; Jeffrey Snover (jsnover) &#8211; DISTINGUISHED ENGINEER &#8211; Some Body         <br />&#160; Cool Person (coolbeans) &#8211; BUSINESS ADMINISTRATOR &#8211; Some Body         <br />&#160; Super Developer (superdev) &#8211; DIRECTOR OF DEVELOPMENT &#8211; Some Body         <br />&#160;&#160;&#160; Dev Manager (devmgr) &#8211; DEVELOPMENT MANAGER &#8211; Super Developer         <br />&#160;&#160;&#160;&#160;&#160; Dev Lead (devlead) _ DEVELOPMENT LEAD &#8211; Dev Manager         <br />&#160;&#160;&#160; Dev Manager2 (devmgr2) &#8211; DEVELOPMENT MANAGER &#8211; Dev Manager         <br />(etc)</font></p>
</blockquote>
<p>Here&#8217;s “Compare-OrgChart.ps1”, a script that starts to show useful differences between two files:</p>
<blockquote><div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; line-height: normal; padding-left: 5px; width: 650px; padding-right: 5px; font-family: ; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: ; background: #cecece; padding-top: 5px"><font face="Consolas"><font style="font-size: 10pt" color="#000000">001                    <br />002                     <br />003                     <br />004                     <br />005                     <br />006                     <br />007                     <br />008                     <br />009                     <br />010                     <br />011                     <br />012                     <br />013                     <br />014</font></font>                 </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: ; background: #fcfcfc; padding-top: 5px"><font face="Consolas"><span style="color: "><font color="#00008b"><font style="font-size: 10pt">param</font></font></span><font style="font-size: 10pt"><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#ff4500">$BeforePath</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$AfterPath</font></span><span style="color: "><font color="#000000">)</font></span>                     </p>
<p></font></font><font style="font-size: 10pt"><font face="Consolas"><font color="#006400"><span style="color: ">## Get the content from the first file and the second file, then sort them by name.</span>                       <br /><span style="color: ">## This lets Compare-Object focus primarily on changes to people, and not be</span>                       <br /><span style="color: ">## impacted by random orderings that might come back from Active Directory</span></font>                     <br /><span style="color: "><font color="#ff4500">$chart1</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Get-Content</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$BeforePath</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">%</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">{</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#ff4500">$_</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">Trim</span><span style="color: ">(</span><span style="color: ">)</span><span style="color: ">&#160;</span><span style="color: ">}</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Sort-Object</font></span>                     <br /><span style="color: "><font color="#ff4500">$chart2</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Get-Content</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$AfterPath</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">%</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">{</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#ff4500">$_</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">Trim</span><span style="color: ">(</span><span style="color: ">)</span><span style="color: ">&#160;</span><span style="color: ">}</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Sort-Object</font></span>                     </p>
<p></font></font><font face="Consolas"><font style="font-size: 10pt"><font color="#006400"><span style="color: ">## The format of the lines are:</span>                       <br /><span style="color: ">## Super Developer (superdev) &#8211; DIRECTOR OF DEVELOPMENT</span>                       <br /><span style="color: ">## So we tell Compare-Object to look for any changes, sort by only their name,</span>                       <br /><span style="color: ">## and after that sort by &quot;Before&quot; then &quot;After&quot;</span></font>                     <br /><span style="color: "><font color="#0000ff">Compare-Object</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$chart1</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$chart2</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">|</font></span>                     <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#0000ff">Sort</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">{</span><span style="color: ">&#160;</span><span style="color: ">(</span></font><span style="color: "><font color="#ff4500">$_</font></span><span style="color: "><font color="#a9a9a9">.</font></span><font color="#000000"><span style="color: ">InputObject</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">-split</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&#8216;-&#8217;</font></span><span style="color: "><font color="#000000">)</font></span><span style="color: "><font color="#a9a9a9">[</font></span><span style="color: "><font color="#800080">0</font></span><span style="color: "><font color="#a9a9a9">]</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">}</span></font><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#8a2be2">SideIndicator</font></span><font color="#000000"> </font></font></font></div>
</td>
</tr>
</tbody>
</table></div>
</blockquote>
<p>Now, pretend the following happens:</p>
<ul>
<li>Jeffrey gets promoted to Technical Fellow (congrats!) </li>
<li>“Dev Manager” leaves the group </li>
<li>“Dev Lead” moves under “Dev Manager2” </li>
</ul>
<p>Here’s the org chart:</p>
<blockquote><p><font face="Courier New">Some Body (somebody) &#8211; GENERAL MANAGER        <br />&#160; Jeffrey Snover (jsnover) &#8211; TECHNICAL FELLOW &#8211; Some Body         <br />&#160; Cool Person (coolbeans) &#8211; BUSINESS ADMINISTRATOR &#8211; Some Body         <br />&#160; Super Developer (superdev) &#8211; DIRECTOR OF DEVELOPMENT &#8211; Some Body         <br />&#160;&#160;&#160; Dev Manager2 (devmgr2) &#8211; DEVELOPMENT MANAGER &#8211; Dev Manager         <br />&#160;&#160;&#160;&#160;&#160; Dev Lead (devlead) _ DEVELOPMENT LEAD &#8211; Dev Manager2</font></p>
<p><font face="Courier New">(etc)</font></p>
</blockquote>
<p>From there, we get this output:</p>
<blockquote><p><font size="1" face="Courier New">PS C:\Users\Lee&gt; Compare-OrgChart C:\temp\org_before.txt C:\temp\org_after.txt</font></p>
<p><font size="1" face="Courier New">InputObject&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SideIndicator        <br />&#8212;&#8212;&#8212;&#8211;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;&#8212;&#8212;&#8212;-         <br />Dev Lead (devlead) _ DEVELOPMENT LEAD &#8211; Dev Manager&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;=         <br />Dev Lead (devlead) _ DEVELOPMENT LEAD &#8211; Dev Manager2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; =&gt;         <br />Dev Manager (devmgr) &#8211; DEVELOPMENT MANAGER &#8211; Super Developer&#160; &lt;=         <br />Jeffrey Snover (jsnover) &#8211; DISTINGUISHED ENGINEER &#8211; Some Body &lt;=         <br />Jeffrey Snover (jsnover) &#8211; TECHNICAL FELLOW &#8211; Some Body&#160;&#160;&#160;&#160;&#160;&#160; =&gt;</font></p>
</blockquote>
<p>That’s pretty cool! Now all we need is a little way to stitch it all together. Here’s a very simple “Update-OrgDiff.ps1” script. All it does is fetch the newest org chart, run the comparison, and email me the results.</p>
<blockquote><div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; line-height: normal; padding-left: 5px; width: 650px; padding-right: 5px; font-family: ; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: ; background: #cecece; padding-top: 5px"><font face="Consolas"><font style="font-size: 10pt" color="#000000">001                    <br />002                     <br />003                     <br />004                     <br />005                     <br />006                     <br />007                     <br />008                     <br />009                     <br />010</font></font>                 </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: ; background: #fcfcfc; padding-top: 5px"><font face="Consolas"><span style="color: "><font color="#ff4500"><font style="font-size: 10pt">$mailRecipient</font></font></span><font style="font-size: 10pt"><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;me@example.com&quot;</font></span>                     </p>
<p><span style="color: "><font color="#ff4500">$file</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;OrgChart-{0}-{1}-{2}.txt&quot;</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">-f</font></span><font color="#000000"><span style="color: ">&#160;</span><span style="color: ">(</span></font><span style="color: "><font color="#0000ff">Get-Date</font></span><span style="color: "><font color="#000000">)</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Month</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#0000ff">Get-Date</font></span><span style="color: "><font color="#000000">)</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Day</font></span><span style="color: "><font color="#a9a9a9">,</font></span><span style="color: "><font color="#000000">(</font></span><span style="color: "><font color="#0000ff">Get-Date</font></span><span style="color: "><font color="#000000">)</font></span><span style="color: "><font color="#a9a9a9">.</font></span><span style="color: "><font color="#000000">Year</font></span>                     <br /><span style="color: "><font color="#0000ff">Get-OrgChart</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">somebody</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-IncludeManager</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">&gt;</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;c:\temp\$file&quot;</font></span>                     <br /><span style="color: "><font color="#ff4500">$results</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160; </font></span><span style="color: "><font color="#0000ff">dir</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">c:\temp\OrgChart-*</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Sort</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">LastWriteTime</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Select</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-Last</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#800080">2</font></span>                     <br /><span style="color: "><font color="#ff4500">$report</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">=</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Compare-OrgChart</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$results</font></span><span style="color: "><font color="#a9a9a9">[</font></span><span style="color: "><font color="#800080">0</font></span><font color="#a9a9a9"><span style="color: ">]</span><span style="color: ">.</span></font><font color="#000000"><span style="color: ">FullName</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#ff4500">$results</font></span><span style="color: "><font color="#a9a9a9">[</font></span><span style="color: "><font color="#800080">1</font></span><font color="#a9a9a9"><span style="color: ">]</span><span style="color: ">.</span></font><font color="#000000"><span style="color: ">FullName</span><span style="color: ">&#160;</span></font><span style="color: "><font color="#a9a9a9">|</font></span>                     <br /><span style="color: "><font color="#000000">&#160;&#160;&#160; </font></span><span style="color: "><font color="#0000ff">Format-Table</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-Auto</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#a9a9a9">|</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#0000ff">Out-String</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-Width</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#800080">100</font></span>                     </p>
<p><span style="color: "><font color="#0000ff">Send-MailMessage</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-To</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$mailRecipient</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-From</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#ff4500">$mailRecipient</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-Subject</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">OrgDiff</font></span></font></font><font face="Consolas"><font style="font-size: 10pt"><font color="#000000"><span style="color: ">&#160;</span>`                       <br /><span style="color: ">&#160;&#160;&#160; </span></font><span style="color: "><font color="#000080">-BodyAsHtml</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8b0000">&quot;&lt;html&gt;&lt;body&gt;&lt;pre&gt;$report&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&quot;</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#000080">-SmtpServer</font></span><span style="color: "><font color="#000000">&#160;</font></span><span style="color: "><font color="#8a2be2">smtphost</font></span><font color="#000000"> </font></font></font></div>
</td>
</tr>
</tbody>
</table></div>
</blockquote>
<p>Set this up as a scheduled task, and you’re golden!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/06/24/organizational-awareness-with-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WMRRA Taste of Racing</title>
		<link>http://www.leeholmes.com/blog/2011/05/02/wmrra-taste-of-racing/</link>
		<comments>http://www.leeholmes.com/blog/2011/05/02/wmrra-taste-of-racing/#comments</comments>
		<pubDate>Tue, 03 May 2011 05:19:10 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/05/02/wmrra-taste-of-racing/</guid>
		<description><![CDATA[Last week, a co-worker mentioned a event being offered again by WMRRA (Washington Motorcycle Road Racing Association) – the “Taste of Racing”. For $20, you get to bring your bike on the track for 20 minutes. A handful of control riders take you through some familiarity laps (and keep things under control during the ride.) [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, a co-worker mentioned a event being offered again by WMRRA (Washington Motorcycle Road Racing Association) – the “<a href="http://wmrra.com/tasteofracing.html">Taste of Racing</a>”.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="227781_1684774685881_1433050347_31322912_7171556_n[1]" border="0" alt="227781_1684774685881_1433050347_31322912_7171556_n[1]" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/05/227781_1684774685881_1433050347_31322912_7171556_n1.jpg" width="323" height="484" /></p>
<p>For $20, you get to bring your bike on the track for 20 minutes. A handful of control riders take you through some familiarity laps (and keep things under control during the ride.)</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="222216_1684774925887_1433050347_31322913_1833109_n[1]" border="0" alt="222216_1684774925887_1433050347_31322913_1833109_n[1]" src="http://www.leeholmes.com/blog/wp-content/uploads/2011/05/222216_1684774925887_1433050347_31322913_1833109_n1.jpg" width="644" height="429" /></p>
<p>But then it&#8217;s just you and wide-open road.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://a7.sphotos.ak.fbcdn.net/hphotos-ak-snc6/230474_1684775125892_1433050347_31322914_6968405_n.jpg" width="640" height="425" /></p>
<p>You know those days when you get an on-ramp all to yourself and smile? Imagine 2 twisty miles of that, designed and shared by people who love it just as much as you do.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc6/221732_1684775285896_1433050347_31322915_3651869_n.jpg" width="640" height="425" /></p>
<p><img src="http://a3.sphotos.ak.fbcdn.net/hphotos-ak-snc6/229542_1684775445900_1433050347_31322916_70530_n.jpg" /></p>
<p>This was the &quot;Bus Stop&quot;, a set of chicanes to slow things down before the main straightaway.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://a5.sphotos.ak.fbcdn.net/hphotos-ak-ash4/223302_1684775645905_1433050347_31322917_7033937_n.jpg" width="640" height="425" /></p>
<p>The straightaway leads to a beautiful sweeping left that you get to take with great speed, and finally get to enjoy all of the rubber in your tires.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc6/230562_1684776005914_1433050347_31322918_938494_n.jpg" width="640" height="425" /></p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/225030_1684776165918_1433050347_31322919_3029686_n.jpg" width="640" height="425" /></p>
<p>From my GPS &#8211; a great mix of slow technical twisties, combined with long stretches of wide-open throttle :)</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://a3.sphotos.ak.fbcdn.net/hphotos-ak-snc6/225726_1684776485926_1433050347_31322921_6502002_n.jpg" width="640" height="386" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/05/02/wmrra-taste-of-racing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Morser &#8211; Keyboard Morse Input Device</title>
		<link>http://www.leeholmes.com/blog/2011/04/07/morser-keyboard-morse-input-device/</link>
		<comments>http://www.leeholmes.com/blog/2011/04/07/morser-keyboard-morse-input-device/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 05:42:47 +0000</pubDate>
		<dc:creator>Lee Holmes</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leeholmes.com/blog/2011/04/07/morser-keyboard-morse-input-device/</guid>
		<description><![CDATA[[Edit: Please see V2 here: http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/]]]></description>
			<content:encoded><![CDATA[<p>[Edit: Please see V2 here: <a href="http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/">http://www.leeholmes.com/blog/2011/10/04/morser-keyboard-morse-input-device-2/</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leeholmes.com/blog/2011/04/07/morser-keyboard-morse-input-device/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

