powershell_blog.xml

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows PowerShell Blog</title><link>http://blogs.msdn.com/b/powershell/</link><description>Automating the world one-liner at a time...</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>WMI cheat sheet for PS users</title><link>http://blogs.msdn.com/b/powershell/archive/2012/10/28/wmi-cheat-sheet-for-ps-users.aspx</link><pubDate>Sun, 28 Oct 2012 21:10:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10363470</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10363470</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/10/28/wmi-cheat-sheet-for-ps-users.aspx#comments</comments><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We got multiple requests to publish the cheat sheet for CIM Cmdlets that was distributed in Tech Ed NA&amp;nbsp;this year. Responding to popular demand, this document is attached as PDF . This is a great resource put together by WMI team for people who want to get started with CIM cmdlets.&lt;/p&gt;
&lt;p&gt;Standard disclaimer :-). Cheat sheet is just for a quick start to get people started&amp;nbsp;- real documentation is here &lt;a href="http://technet.microsoft.com/en-us/library/jj553783.aspx"&gt;http://technet.microsoft.com/en-us/library/jj553783.aspx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Osama Sajid&lt;/p&gt;
&lt;p&gt;Program Manager&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363470" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-36-34-70/WMI-CheatSheet-for-PS.pdf" length="289863" type="application/pdf" /><category domain="http://blogs.msdn.com/b/powershell/archive/tags/WMI/">WMI</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CIM/">CIM</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CimCmdlets/">CimCmdlets</category></item><item><title>Joining Multiple Tables, Grouping and Evaluating Totals</title><link>http://blogs.msdn.com/b/powershell/archive/2012/10/04/joining-multiple-tables-grouping-and-evaluating-totals.aspx</link><pubDate>Thu, 04 Oct 2012 00:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10355722</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10355722</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/10/04/joining-multiple-tables-grouping-and-evaluating-totals.aspx#comments</comments><description>&lt;div class="WordSection1"&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;Joining Multiple Tables, Grouping And Evaluating Totals&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;This is a continuation to the &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt; blog post considering multiple joins and SQL style grouping and total evaluation.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In the &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt; blog we&amp;rsquo;ve seen that relational data naturally organizes in multiple tables.&amp;nbsp;Once we have those tables, we frequently want to see&amp;nbsp;the information back together, so we need something like &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt;. Sometimes we also need to group the information and evaluate totals inside the groups. For instance, what are the total sales for each customer?&lt;/p&gt;
&lt;p class="MsoNormal"&gt;How can we use &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt;&lt;span class="MsoHyperlink"&gt; &lt;/span&gt;in multiple tables and group information from the tables to report totals?&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;Joining multiple tables:&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Consider the following tables describing sales at a fruit stand:&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table class="MsoTableGrid" style="border: currentColor; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="271" valign="top" style="padding: 0in 5.4pt; width: 203.4pt;" colspan="3"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: normal;"&gt;&lt;b&gt;Customers&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Id&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Name&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Phone&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;John Smith&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;(206)555-8899&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Mark Stone&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;(425)999-8811&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Ruth Moore&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;(425)888-3355&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table class="MsoTableGrid" style="border: currentColor; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="271" valign="top" style="padding: 0in 5.4pt; width: 203.4pt;" colspan="3"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;&lt;b&gt;Products&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Id&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Name&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Price&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Apple&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;10&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Orange&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;12&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Kiwi&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114" valign="top" style="padding: 0in 5.4pt; width: 85.5pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;15&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-size: 7pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;table align="center" class="MsoTableGrid" style="border: currentColor; margin-right: 6.75pt; margin-left: 6.75pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="319" valign="top" style="padding: 0in 5.4pt; width: 239.4pt;" colspan="3"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;&lt;b&gt;Orders&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Id&lt;/p&gt;
&lt;/td&gt;
&lt;td width="174" valign="top" style="padding: 0in 5.4pt; width: 130.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Date&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102" valign="top" style="padding: 0in 5.4pt; width: 76.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;CustomerId&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="174" valign="top" style="padding: 0in 5.4pt; width: 130.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/6/2012 9:12:44 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102" valign="top" style="padding: 0in 5.4pt; width: 76.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="174" valign="top" style="padding: 0in 5.4pt; width: 130.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/7/2012 6:12:10 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102" valign="top" style="padding: 0in 5.4pt; width: 76.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;td width="174" valign="top" style="padding: 0in 5.4pt; width: 130.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/5/2012 12:05:03 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102" valign="top" style="padding: 0in 5.4pt; width: 76.5pt; text-align: center;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;table align="center" class="MsoTableGrid" style="border: currentColor; margin-right: 6.75pt; margin-left: 6.75pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="259" valign="top" style="padding: 0in 5.4pt; width: 2.7in;" colspan="4"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;&lt;b&gt;OrderItems&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center; line-height: 115%; margin-bottom: 10pt;"&gt;Id&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center; line-height: 115%; margin-bottom: 10pt;"&gt;Quantity&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center; line-height: 115%; margin-bottom: 10pt;"&gt;ProductId&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center; line-height: 115%; margin-bottom: 10pt;"&gt;OrderId&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="43" valign="top" style="padding: 0in 5.4pt; width: 0.45in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;6&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72" valign="top" style="padding: 0in 5.4pt; width: 0.75in;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="78" valign="top" style="padding: 0in 5.4pt; width: 58.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="66" valign="top" style="padding: 0in 5.4pt; width: 49.5pt;"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;As we saw in the &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt; blog, we need this many tables to deal with the simple conceptual problem of selling fruit!&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;One might question the need for the OrderItems table. An order item is a line in the receipt for an order that lists a product and its quantity. Since there can be many items per order, it needs its own table as mentioned in the &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt; blog.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;As we can see from the data, we have 3 customers, 3 products, 3 orders, and 6 order items. The three first order items are for the Order with Id 1.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Good data design forces us to split the tables, but after this is done, we frequently need to see the data together.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;For example, suppose I want a report with all basic receipt information, including customer name, order date, all products bought, their quantity, and price. Here is the SQL statement that produces the report:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer.Name, [Order].Date, OrderItem.Quantity,&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Product.Name AS [Product Name], Product.Price&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderItem INNER JOIN Product ON OrderItem.ProductId = Product.id INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Customer INNER JOIN&amp;nbsp; [Order] ON Customer.id = [Order].CustomerId ON OrderItem.OrderId = [Order].id&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;Here is the result:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table class="MsoTableGrid" style="border: currentColor; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="559" valign="top" style="padding: 0in 5.4pt; width: 419.4pt;" colspan="5"&gt;
&lt;p align="center" class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: center; line-height: 115%;"&gt;&lt;b&gt;Joining All Tables&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Name&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Date&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Quantity&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Product Name&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Price&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;John Smith&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/6/2012 9:12:44 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Apple&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;10&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;John Smith&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/6/2012 9:12:44 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Orange&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;12&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;John Smith&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/6/2012 9:12:44 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Kiwi&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;John Smith&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/7/2012 6:12:10 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;5&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Apple&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;10&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;John Smith&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/7/2012 6:12:10 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Orange&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;12&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115" valign="top" style="padding: 0in 5.4pt; width: 1.2in;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Mark Stone&lt;/p&gt;
&lt;/td&gt;
&lt;td width="156" valign="top" style="padding: 0in 5.4pt; width: 117pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;6/5/2012 12:00:00 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112" valign="top" style="padding: 0in 5.4pt; width: 83.85pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="128" valign="top" style="padding: 0in 5.4pt; width: 95.75pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;Apple&lt;/p&gt;
&lt;/td&gt;
&lt;td width="49" valign="top" style="padding: 0in 5.4pt; width: 36.4pt;"&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal;"&gt;10&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;A little explanation of the SQL statement&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The&amp;nbsp; &amp;ldquo;AS [Product Name]&amp;rdquo; segment sets the column name in the output. Both product name and customer name are called &amp;ldquo;Name&amp;rdquo; in their own tables, so we need to differentiate them in the output.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The brackets around &amp;ldquo;[Order]&amp;rdquo; differentiate it from the SQL "Order" keyword.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The Inner Join shows only the items present in both tables.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;All 4 tables are &amp;ldquo;inner joined&amp;rdquo; in the statement.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;Putting the data in Windows PowerShell&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;From here on, we will use Windows PowerShell to manipulate this data, so let&amp;rsquo;s start by putting this data in PowerShell.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The following script creates four CSV files and then imports them into four variables that contain our data.&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;@"&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id,Name,Phone&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1,John Smith,(206)555-8899&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2,Mark Stone,(425)999-8811&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3,Ruth Moore,(425)888-3355&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"@&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\customers.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customers&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 9pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 9pt;"&gt;import-csv&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\customers.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;@"&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id,Name,Price&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1,Apple,10&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2,Orange,12&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3,Kiwi,15&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"@&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\products.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$products&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 9pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 9pt;"&gt;import-csv&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\products.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;@"&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id,Date,CustomerId&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1,6/6/2012 9:12:44 AM,1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2,6/7/2012 6:12:10 PM,1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3,6/5/2012 12:05:03 PM,2&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"@&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\orders.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$orders&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 9pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 9pt;"&gt;import-csv&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\orders.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;@"&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id,Quantity,ProductId,OrderId&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1,2,1,1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2,1,2,1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3,4,3,1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;4,5,1,2&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;5,4,2,2&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;6,1,1,3&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"@&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\orderItems.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$orderItems&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 9pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 9pt;"&gt;import-csv&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: blueviolet;"&gt;c:\temp\orderItems.csv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"Customers "&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;;&lt;span style="color: orangered;"&gt;$customers&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt; &lt;span style="color: navy;"&gt;-AutoSize&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"`r`nProducts "&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;;&lt;span style="color: orangered;"&gt;$products&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt; &lt;span style="color: navy;"&gt;-AutoSize&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"`r`nOrders "&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;;&lt;span style="color: orangered;"&gt;$orders&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt; &lt;span style="color: navy;"&gt;-AutoSize&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkred; font-family: 'Lucida Console'; font-size: 9pt;"&gt;"`r`nOrder Items "&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;;&lt;span style="color: orangered;"&gt;$orderItems&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt; &lt;span style="color: navy;"&gt;-AutoSize &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Here is the output:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Customers &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Phone &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;-- ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----- &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1&amp;nbsp; John Smith&amp;nbsp; (206)555-8899&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2&amp;nbsp; Mark Stone&amp;nbsp; (425)999-8811&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3&amp;nbsp; Ruth Moore&amp;nbsp; (425)888-3355&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Products &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id Name&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;-- ----&amp;nbsp;&amp;nbsp;&amp;nbsp; -----&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1&amp;nbsp; Apple&amp;nbsp;&amp;nbsp; 10 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2&amp;nbsp; Orange&amp;nbsp; 12 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3&amp;nbsp; Kiwi&amp;nbsp;&amp;nbsp;&amp;nbsp; 15 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Orders &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerId&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;-- ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1&amp;nbsp; 6/6/2012&amp;nbsp; 9:12:44 AM 1 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2&amp;nbsp; 6/7/2012&amp;nbsp; 6:12:10 PM 1 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3&amp;nbsp; 6/5/2012&amp;nbsp; 12:05:03 PM 2 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Order Items &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Id Quantity ProductId OrderId&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;-- -------- --------- -------&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;1&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; 1 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;2&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 1 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;3&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;1 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;4&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;2 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;5&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 2 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;6&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;3 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; line-height: normal; background: #012456; text-autospace: none;"&gt;&lt;span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: whitesmoke;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The equivalent joins in PowerShell with the help of &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx"&gt;Join-Object&lt;/a&gt; are as follows:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# Joins the customer to his orders and places Name(from Customer),&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# Date(from Order) and Id (from Order)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerOrders&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 8pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 8pt;"&gt;Join-Object&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: navy;"&gt;-Left&lt;/span&gt; &lt;span style="color: orangered;"&gt;$customers&lt;/span&gt; &lt;span style="color: navy;"&gt;-Right&lt;/span&gt; &lt;span style="color: orangered;"&gt;$orders&lt;/span&gt; &lt;span style="color: navy;"&gt;-LeftProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt; &lt;span style="color: navy;"&gt;-RightProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Date&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Id&lt;/span&gt; &lt;span style="color: navy;"&gt;-Where&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Id &lt;span style="color: darkgray;"&gt;-eq&lt;/span&gt; &lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;CustomerId}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# Adds the OrderItems to the data already gathered. The output objects will&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# have Name(from Customer), Date(from Order), Quantity(from OrderItem) &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# and ProductId (from OrderItem).&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerOrderItems&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 8pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 8pt;"&gt;Join-Object&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: navy;"&gt;-Left&lt;/span&gt; &lt;span style="color: orangered;"&gt;$customerOrders&lt;/span&gt; &lt;span style="color: navy;"&gt;-Right&lt;/span&gt; &lt;span style="color: orangered;"&gt;$orderItems&lt;/span&gt; &lt;span style="color: navy;"&gt;-LeftProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Date&lt;/span&gt; &lt;span style="color: navy;"&gt;-RightProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Quantity&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;ProductId&lt;/span&gt; &lt;span style="color: navy;"&gt;-Where&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Id &lt;span style="color: darkgray;"&gt;-eq&lt;/span&gt; &lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;OrderId}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# Adds the Products to the data already gathered. The output objects will&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# have Name (from Customer), Date(from Order), Quantity (from OrderItem)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# Product Name (from Product) and Price from Product&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# We use a Hashtable instead of simply "Name" for Product Name because&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# "Name" is already present in the output object for the customer name,&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# so we need to differentiate the Product name from that.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# If you did not know the syntax for the Hashtable Expression, you will&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: darkgreen; font-family: 'Lucida Console'; font-size: 8pt;"&gt;# be interested in the fact it also works for Select-Object properties&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 8pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 8pt;"&gt;Join-Object&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: navy;"&gt;-Left&lt;/span&gt; &lt;span style="color: orangered;"&gt;$customerOrderItems&lt;/span&gt; &lt;span style="color: navy;"&gt;-Right&lt;/span&gt; &lt;span style="color: orangered;"&gt;$products&lt;/span&gt; &lt;span style="color: navy;"&gt;-LeftProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Date&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Quantity&lt;/span&gt; &lt;span style="color: navy;"&gt;-RightProperties&lt;/span&gt; @{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;"Product Name"&lt;/span&gt;;Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Name}}&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Price&lt;/span&gt; &lt;span style="color: navy;"&gt;-Where&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;ProductId &lt;span style="color: darkgray;"&gt;-eq&lt;/span&gt; &lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Id}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Here is the output:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity Product Name Price&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -------- ------------ -----&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;John Smith 6/6/2012 9:12:44 AM&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apple&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;John Smith 6/6/2012 9:12:44 AM&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Orange&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;John Smith 6/6/2012 9:12:44 AM&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Kiwi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;John Smith 6/7/2012 6:12:10 PM&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apple&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;John Smith 6/7/2012 6:12:10 PM&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Orange&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Mark Stone 6/5/2012 12:05:03 PM 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apple&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;So, the following three lines of code &amp;hellip;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerOrders&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 8pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 8pt;"&gt;Join-Object&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: navy;"&gt;-Left&lt;/span&gt; &lt;span style="color: orangered;"&gt;$customers&lt;/span&gt; &lt;span style="color: navy;"&gt;-Right&lt;/span&gt; &lt;span style="color: orangered;"&gt;$orders&lt;/span&gt; &lt;span style="color: navy;"&gt;-LeftProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt; &lt;span style="color: navy;"&gt;-RightProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Date&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Id&lt;/span&gt; &lt;span style="color: navy;"&gt;-Where&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Id &lt;span style="color: darkgray;"&gt;-eq&lt;/span&gt; &lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;CustomerId}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerOrderItems&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 8pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 8pt;"&gt;Join-Object&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: navy;"&gt;-Left&lt;/span&gt; &lt;span style="color: orangered;"&gt;$customerOrders&lt;/span&gt; &lt;span style="color: navy;"&gt;-Right&lt;/span&gt; &lt;span style="color: orangered;"&gt;$orderItems&lt;/span&gt; &lt;span style="color: navy;"&gt;-LeftProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Date&lt;/span&gt; &lt;span style="color: navy;"&gt;-RightProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Quantity&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;ProductId&lt;/span&gt; &lt;span style="color: navy;"&gt;-Where&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Id &lt;span style="color: darkgray;"&gt;-eq&lt;/span&gt; &lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;OrderId}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 8pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="color: darkgray; font-family: 'Lucida Console'; font-size: 8pt;"&gt;=&lt;/span&gt;&lt;span style="color: blue; font-family: 'Lucida Console'; font-size: 8pt;"&gt;Join-Object&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 8pt;"&gt; &lt;span style="color: navy;"&gt;-Left&lt;/span&gt; &lt;span style="color: orangered;"&gt;$customerOrderItems&lt;/span&gt; &lt;span style="color: navy;"&gt;-Right&lt;/span&gt; &lt;span style="color: orangered;"&gt;$products&lt;/span&gt; &lt;span style="color: navy;"&gt;-LeftProperties&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Date&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Quantity&lt;/span&gt; &lt;span style="color: navy;"&gt;-RightProperties&lt;/span&gt; @{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;"Product Name"&lt;/span&gt;;Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Name}}&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;&lt;span style="color: blueviolet;"&gt;Price&lt;/span&gt; &lt;span style="color: navy;"&gt;-Where&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;ProductId &lt;span style="color: darkgray;"&gt;-eq&lt;/span&gt; &lt;span style="color: orangered;"&gt;$args&lt;/span&gt;&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Id}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;hellip; do the same job as the SQL statement:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;Customer.Name, [Order].Date, OrderItem.Quantity,&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Product.Name AS [Product Name], Product.Price&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OrderItem INNER JOIN Product ON OrderItem.ProductId = Product.id INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Customer INNER JOIN&amp;nbsp; [Order] ON Customer.id = [Order].CustomerId ON OrderItem.OrderId = [Order].id&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: justify;"&gt;There are some advantages to the SQL statement:&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="margin: 0pt; padding: 0pt; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&amp;middot;&lt;span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;It is a single statement that is somewhat shorter than the three statements&amp;nbsp; in PowerShell.&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="margin: 0pt; padding: 0pt; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol;"&gt;&amp;middot;&lt;span style="font: 7pt/normal 'Times New Roman'; font-size-adjust: none; font-stretch: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;It has a better syntax for aliasing a property in the output (&amp;ldquo;as ProductName&amp;rdquo; as opposed to &amp;ldquo;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;@{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;"Product Name"&lt;/span&gt;;Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Name}}&lt;/span&gt;&amp;rdquo;).&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;In my opinion, those are small advantages. Each one of the PowerShell join statements is easy to understand in isolation. The hashtable syntax used in the third command (to change a property name) is a bit long, but very common to PowerShell users, because&amp;nbsp; it is useful for other cmdlets including Select-Object.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;I considered changing Join-Object to take all the lists and Where clauses in a single cmdlet call, but the need to pair each of two lists with a Where clause (and a Join type) makes the command a bit too cryptic for my taste. I prefer three statements that are easy to understand to one that is not. Performance-wise, there is no difference, because each Join has to be considered in isolation.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Now that the data is joined, what about getting the total money spent by each customer, the total money spent in each product and the total money spent?&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;Total Money Spent by Each Customer&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;Let&amp;rsquo;s start with the whole command:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;name&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Select-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;@{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;'Total'&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Group &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;ForEach-Object&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Begin&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;;} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Process&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;+=[&lt;/span&gt;&lt;span style="color: teal;"&gt;int&lt;/span&gt;&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Price&lt;span style="color: darkgray;"&gt;*&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Quantity} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-End&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;}}} &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;It produces this output:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;John Smith 190&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;Mark Stone&amp;nbsp; 10&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The first line:&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="color: orangered; line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Produces two groups:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;Count Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;----- ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 John Smith&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {@{Name=John Smith; Date=6/6/2012 9:12:44 AM;...&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: courier new,courier; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 Mark Stone&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {@{Name=Mark Stone; Date=6/5/2012 12:05:03 PM;...&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;In order to better see what is in each group, we run:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;(&lt;span style="color: orangered;"&gt;$customerProducts&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;name&lt;/span&gt;)&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Group &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Which produces:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : John Smith&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6/6/2012 9:12:44 AM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp; : 2&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;ProductName : Apple&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Price&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;: 10&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : John Smith&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6/6/2012 9:12:44 AM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;ProductName : Orange&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Price&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 12&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : John Smith&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6/6/2012 9:12:44 AM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp; : 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;ProductName : Kiwi&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Price&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 15&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : John Smith&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6/7/2012 6:12:10 PM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp; : 5&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;ProductName : Apple&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Price&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : John Smith&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6/7/2012 6:12:10 PM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp; : 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;ProductName : Orange&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Price&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 12 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;And:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;(&lt;span style="color: orangered;"&gt;$customerProducts&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;name&lt;/span&gt;)&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: purple;"&gt;1&lt;/span&gt;&lt;span style="color: darkgray;"&gt;].&lt;/span&gt;Group &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Which produces:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Mark Stone&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 6/5/2012 12:05:03 PM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;ProductName : Apple&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Price&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;So, inside the &amp;ldquo;Group&amp;rdquo; property of each object in the output of group-object is the Price and Quantity we want to multiply in order to get a total. If we wanted just the total quantity of fruit we could do:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;name&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Select-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;'Total'&lt;/span&gt;;Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{(&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Group &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Measure-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Quantity&lt;/span&gt; &lt;span style="color: navy;"&gt;-Sum&lt;/span&gt;)&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Sum}} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;With output:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -----&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;John Smith&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Mark Stone&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: blueviolet; font-family: 'Lucida Console';"&gt;Name&lt;/span&gt; is the first column in the output. The second column is given by:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;@{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;'Total'&lt;/span&gt;; Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{(&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Group &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Measure-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Quantity&lt;/span&gt; &lt;span style="color: navy;"&gt;-Sum&lt;/span&gt;)&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Sum}}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;This hashtable is a syntax for select object which means a column with a Name = Total and a value which is the Expression. The Expression gets the value of the Group property and pipes to Measure-Object to sum the &amp;lsquo;Quantity&amp;rsquo; property of each member of the Group. Finally the Sum property of the Measure-Object result is retrieved. That property contains the actual sum.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Since we want to get Price * Quantity and measure-object only supports plain properties we end up with the full command repeated here:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;name&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Select-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;@{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;'Total'&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Group &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;ForEach-Object&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Begin&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;;} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Process&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;+=[&lt;/span&gt;&lt;span style="color: teal;"&gt;int&lt;/span&gt;&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Price&lt;span style="color: darkgray;"&gt;*&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Quantity} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-End&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;}}} &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Instead of | measure-object we have a | ForEach-Object where we use &amp;ndash;Begin, -Process and &amp;ndash;End to evaluate the total. This could be easily modified to calculate anything else, including averages, standard deviations, etc.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-size: 4pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt; text-align: justify;"&gt;Note: The [int] cast in front of $_.Price is required because the price is a string out of our CSV file. This could be avoided by using Export-CliXml and Import-CliXml for our data, whioch would preserve the data type.&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;Here is the corresponding SQL statement:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;Customer.Name, &lt;b&gt;SUM(OrderItem.Quantity * Product.Price)&lt;/b&gt; AS SUM&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OrderItem INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product ON OrderItem.ProductId = Product.id INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Order] ON Customer.id = [Order].CustomerId ON OrderItem.OrderId = [Order].id&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;b&gt;GROUP BY Customer.Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The SQL statement combines the joining, grouping and total evaluation(Price * Quantity) operations.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The Powershell statement is only doing the grouping and total evaluation, since the $customerProducts variable has the result of the joins performed in the previous section of this blog post.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The bold segments of the SQL statement are performing the grouping and the PowerShell statement.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;SQL is designed specifically for this kind of data, so it provides a shorter syntax overall, but I believe the PowerShell equivalent is simple enough to understand.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b&gt;Total Money Spent in Each Product&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: justify;"&gt;The only thing that changes from the previous section is that the property we&amp;rsquo;re passing to Group-Object is &amp;ldquo;ProductName&amp;rdquo;:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;Group-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;ProductName&lt;/span&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Select-Object&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Name&lt;/span&gt;&lt;span style="color: darkgray;"&gt;,&lt;/span&gt;@{Name&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: darkred;"&gt;'Total'&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Group &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;ForEach-Object&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Begin&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;;} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Process&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;+=[&lt;/span&gt;&lt;span style="color: teal;"&gt;int&lt;/span&gt;&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Price&lt;span style="color: darkgray;"&gt;*&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Quantity} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-End&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;}}} &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;format-table&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Name&amp;nbsp;&amp;nbsp; Sum&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;----&amp;nbsp;&amp;nbsp; ---&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Apple&amp;nbsp;&amp;nbsp; 80&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Orange&amp;nbsp; 60&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: #012456; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: whitesmoke; font-family: 'Lucida Console'; font-size: 9pt;"&gt;Kiwi&amp;nbsp;&amp;nbsp;&amp;nbsp; 60 &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The corresponding SQL is:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;SELECT&amp;nbsp;&amp;nbsp;Product.Name, &lt;b&gt;SUM(OrderItem.Quantity * Product.Price)&lt;/b&gt; AS Sum&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OrderItem INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Product ON OrderItem.ProductId = Product.id&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&lt;b&gt;GROUP BY Product.Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;b&gt;Total Money Spent&lt;/b&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;Here is the command that produces this total:&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="color: orangered; font-family: 'Lucida Console'; font-size: 9pt;"&gt;$customerProducts&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt; &lt;span style="color: darkgray;"&gt;|&lt;/span&gt; &lt;span style="color: blue;"&gt;ForEach-Object&lt;/span&gt; `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Begin&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: purple;"&gt;0&lt;/span&gt;;} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-Process&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;&lt;span style="color: darkgray;"&gt;+=[&lt;/span&gt;&lt;span style="color: teal;"&gt;int&lt;/span&gt;&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Price&lt;span style="color: darkgray;"&gt;*&lt;/span&gt;&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;&lt;span style="color: darkgray;"&gt;.&lt;/span&gt;Quantity} `&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: navy;"&gt;-End&lt;/span&gt; {&lt;span style="color: orangered;"&gt;$total&lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="background: white; margin: 0pt; padding: 0pt; line-height: normal;"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Here is the corresponding SQL:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;SELECT&amp;nbsp; &lt;b&gt;SUM(OrderItem.Quantity * Product.Price)&lt;/b&gt; AS Sum&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OrderItem INNER JOIN&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Product ON OrderItem.ProductId = Product.id&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0pt; padding: 0pt;"&gt;Lucio Silveira[MSFT]&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10355722" width="1" height="1"&gt;</description></item><item><title>Windows Management Framework 3.0 Available for Download</title><link>http://blogs.msdn.com/b/powershell/archive/2012/09/17/windows-management-framework-3-0-available-for-download.aspx</link><pubDate>Mon, 17 Sep 2012 19:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10350225</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10350225</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/09/17/windows-management-framework-3-0-available-for-download.aspx#comments</comments><description>&lt;p&gt;We hope that you&amp;rsquo;ve been enjoying all of the great new Windows PowerShell 3.0 features in &lt;a href="http://www.windows-server-launch.com/"&gt;Windows Server 2012&lt;/a&gt;. We wanted to make sure that everyone knows the final release of Windows Management Framework 3.0 is also available for download from the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=251995"&gt;Microsoft Download Center&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Windows Management Framework 3.0 makes much of the same great management functionality from Windows Server 2012 available to earlier versions of Windows. Windows Management Framework 3.0 allows you to install Windows PowerShell 3.0 (including a new version of WMI and WinRM) on the following Operating Systems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows 7 Service Pack 1 (32-bit &amp;amp; 64-bit)&lt;/li&gt;
&lt;li&gt;Windows Server 2008 R2 Service Pack 1 (64-bit only, includes Server Core)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Windows Server 2008 Service Pack 2 (32-bit &amp;amp; 64-bit)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: You must uninstall any of the pre-release packages of Windows Management Framework prior to installing the final release.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Travis Jones [MSFT] &lt;br /&gt;Program Manager &amp;ndash; Windows PowerShell &lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10350225" width="1" height="1"&gt;</description></item><item><title>Managing Hardware devices from PowerShell</title><link>http://blogs.msdn.com/b/powershell/archive/2012/09/10/managing-hardware-devices-from-powershell.aspx</link><pubDate>Mon, 10 Sep 2012 17:52:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10347897</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10347897</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/09/10/managing-hardware-devices-from-powershell.aspx#comments</comments><description>&lt;p&gt;Steve did a very cool blog post last month about managing hardware that implements standard DMTF profiles (examples: Intel AMT , Broadcom TruManage )&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/wmi/archive/2012/08/08/standards-based-hardware-management-using-powershell.aspx"&gt;http://blogs.msdn.com/b/wmi/archive/2012/08/08/standards-based-hardware-management-using-powershell.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;He has also published a PowerShell module on TechNet script center to help IT Pros. This module has been built on top of new CIM Cmdlets.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Out-of-Band-84009c12"&gt;http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Out-of-Band-84009c12&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Take a look, and send your feedback.&lt;/p&gt;
&lt;p&gt;Osama Sajid&lt;/p&gt;
&lt;p&gt;Program Manager, WMI&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10347897" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/WMI/">WMI</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CIM/">CIM</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/DMTF/">DMTF</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Hardware+Management/">Hardware Management</category></item><item><title>Introduction to CIM Cmdlets</title><link>http://blogs.msdn.com/b/powershell/archive/2012/08/24/introduction-to-cim-cmdlets.aspx</link><pubDate>Fri, 24 Aug 2012 22:42:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10343415</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10343415</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/08/24/introduction-to-cim-cmdlets.aspx#comments</comments><description>&lt;p&gt;PowerShell 3.0 shipping with Windows server 2012 and Windows 8 brings a new set of Cmdlets to manage any server or device that complies with CIM and WS-Man standards defined by DMTF. In this blog post we will explore these new Cmdlets and how can they help IT Pros in managing a datacenter.&lt;/p&gt; &lt;p&gt;The list of new Cmdlets is given in the table below: &lt;table border="1" cellspacing="0" cellpadding="0" width="668"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;&lt;b&gt;Cmdlet&lt;/b&gt;&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;&lt;b&gt;Purpose&lt;/b&gt;&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Get-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Gets instances of a class.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;New-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Creates a new instance of a class.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Remove-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Removes one of more instances of a class.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Set-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Modifies one or more instances of a class.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Get-CimAssociatedInstance&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Gets all the associated instances for a particular instance.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Invoke-CimMethod&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Invokes instance or static method of a class.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Get-CimClass&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Gets class schema of a CIM class.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Register-CimIndicationEvent&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Helps subscribe to events.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;New-CimSession&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Creates a CIM Session with local or a remote machine&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Get-CimSession&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Gets a list of CIM Sessions that have been made.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;Remove-CimSession&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Removes CimSessions that are there on a machine.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="205"&gt; &lt;p&gt;New-CimSessionOption&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="461"&gt; &lt;p&gt;Creates a set of options that can be used while creating a CIM session.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;Basic terminology&lt;/h3&gt; &lt;p&gt;If you are already familiar with terms like WMI, CIM, WinRM and WS-Man, you can skip this section.&lt;/p&gt; &lt;p&gt;&lt;b&gt;CIM&lt;/b&gt;: Common Information Model (CIM) is the DMTF standard [DSP0004] for describing the structure and behavior of managed resources such as storage, network, or software components.&lt;/p&gt; &lt;p&gt;&lt;b&gt;WMI&lt;/b&gt;: Windows Management Instrumentation (WMI) is a CIM server that implements the CIM standard on Windows. &lt;/p&gt; &lt;p&gt;&lt;b&gt;WS-Man&lt;/b&gt;: WS-Management (WS-Man) protocol is a SOAP-based, firewall-friendly protocol for management clients to communicate with CIM servers.&lt;/p&gt; &lt;p&gt;&lt;b&gt;WinRM:&lt;/b&gt; Windows Remote Management (WinRM) is the Microsoft implementation of the WS-Man protocol on Windows.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;Why new Cmdlets&lt;/h3&gt; &lt;p&gt;With Windows Server 2012, Windows has shifted its focus to become a Cloud OS. In a datacenter running a private or public cloud – there are always set of devices and servers from different vendors. We strongly believe that the only way to reduce the cost of running datacenters is through automation built on top of standards. There is less learning and less chances of error when IT Pros are able to automate heterogeneous environment using same set of tools that they have learned for Windows.&lt;/p&gt; &lt;p&gt;This was not the case with previous versions of PowerShell. We had two set of Cmdlets to manage Windows and Non-Windows. WMI Cmdlets were primarily used to manage Windows and WsMan Cmdlets were targeted at non-Windows that implemented WsMan standard.&lt;/p&gt; &lt;p&gt;&lt;b&gt;WMI Cmdlets: &lt;/b&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;- Pros: Provided better task abstraction compared to WsMan Cmdlets, output is a .NET object.&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;- Cons: Use of non-standard DCOM protocol. Does not work for non-Windows. &lt;b&gt;&lt;/b&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;WinRM Cmdlets&lt;/b&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;- Pros: Works with Windows and non-Windows using standard protocol.&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;- Cons: Poor task abstraction. Output is XML , scaring most IT Pros away&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;We heard from you that the major obstacle in PS scripting for WMI is lack of discoverability. We also heard that WMI Cmdlets don’t provide first class PS experience. There are issues with serializing a WMI object, there is no concept of session reuse and WMI object has weird looking property names (like __Server). Last but not least, there is poor formatting for most of the commonly used WMI classes. Someone said “When I run Get-WmiObject Win32_process, I feel like standing on bridge above freeway and lot of traffic zipping in front of my eyes”.&lt;/p&gt; &lt;h3&gt;Key goals for new CIM Cmdlets&lt;/h3&gt; &lt;blockquote&gt; &lt;p&gt;- &lt;strong&gt;Rich PowerShell experience&lt;/strong&gt;. Make CIM a first class citizen of PS, addressing usability concerns and user feedback for WMI and WsMan Cmdlets. &lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;- &lt;strong&gt;Standard compliance&lt;/strong&gt;. With so much focus on standards, our goal is to make PowerShell the best platform for managing Windows and Non-Windows. New CIM Cmdlets should be able to manage any CIM + WsMan compliant endpoint, including Windows.&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;- &lt;strong&gt;Support for down-level machines&lt;/strong&gt;. We understand that there are more down-level servers in a datacenter than there would be Windows Server 2012 for some time to come. We want to make sure same set of Cmdlets can be used to manage down-level Windows as well.&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;In the subsequent sections we will talk about each of these goals in detail.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;&lt;u&gt;Goal 1 - Rich PowerShell experience&lt;/u&gt; &lt;/h3&gt; &lt;h4&gt;&lt;strong&gt;1. Discovery of classes and namespaces.&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;There is a famous joke about WMI, often attributed to Jeffrey Snover. “IT Pros love and hate WMI. They love it because there is so much they accomplish with WMI and PowerShell. They hate it because it is very difficult to discover what’s in there”&lt;/p&gt; &lt;p&gt;To address this, we have done key improvements in new CIM Cmdlets&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Tab completion for classname and namespace parameters. &lt;/li&gt; &lt;li&gt;Get-CimClass Cmdlet &lt;/li&gt; &lt;/ol&gt; &lt;p&gt; &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;# Using tab completion for CIM cmdlet parameters ( Tab+Space in ISE shows a drop down)&lt;/p&gt; &lt;p&gt;Get-CimInstance –Namespace &amp;lt;Tab&amp;gt; #Finding top-level namespaces&lt;/p&gt; &lt;p&gt;# Tab completion for class names&lt;/p&gt; &lt;p&gt;# If namespace is not specified, shows classes from default root/cimv2 namespace&lt;/p&gt; &lt;p&gt;Get-CimInstance -ClassName *Bios&amp;lt;Tab&amp;gt;&lt;/p&gt; &lt;p&gt;Get-CimInstance –Namespace root/Microsoft/Windows/smb –ClassName &amp;lt;tab&amp;gt;&lt;/p&gt; &lt;p&gt;# Note: Tab completion only works for local machine.&lt;/p&gt; &lt;p&gt;#Using Get-CimClass for advanced class search&lt;/p&gt; &lt;p&gt;#All classes in root/cimv2&lt;/p&gt; &lt;p&gt;PS:&amp;gt;Get-CimClass &lt;/p&gt; &lt;p&gt;#Classes named like disk&lt;/p&gt; &lt;p&gt;PS:&amp;gt;Get-CimClass -ClassName *disk*&lt;/p&gt; &lt;p&gt;# The Cmdlet makes querying much easier (what would require scripting before)&lt;/p&gt; &lt;p&gt;# Get all classes starting with &amp;quot;Win32&amp;quot; that have method starting with &amp;quot;Term&amp;quot; &lt;/p&gt; &lt;p&gt;PS:&amp;gt;Get-CimClass Win32* -MethodName Term* &lt;/p&gt; &lt;p&gt;# Get classes starting with &amp;quot;Win32&amp;quot; that have a property named &amp;quot;Handle&amp;quot;&lt;/p&gt; &lt;p&gt;PS:&amp;gt;Get-CimClass Win32* -PropertyName Handle&lt;/p&gt; &lt;p&gt;# Get classes starting with &amp;quot;Win32&amp;quot; that have the &amp;quot;Association&amp;quot; qualifier&lt;/p&gt; &lt;p&gt;PS:&amp;gt;Get-CimClass Win32* -QualifierName Association&lt;/p&gt; &lt;p&gt;#Find classes used for events&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimClass -Namespace root/Microsoft/Windows/smb -class *Smb* -QualifierName Indication&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;Get-CimClass and tab completion described above only works for local machine. If you specify ComputerName or CimSession parameter, tab completion would not work. In order to make tab completion more efficient, PowerShell caches the list of namespaces and classnames.&lt;/p&gt; &lt;h4&gt;&lt;strong&gt;2. Getting Instances&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;Getting/Enumerating instance of a class is the most commonly performed operation. We wanted the new Get-CimInstance Cmdlet to have better performance and even better user experience as compared to the old Get-WmiObject cmdlet. To achieve these goals we made the following design decisions:&lt;/p&gt; &lt;p&gt;a. The Get-CimInstance cmdlet returns one or more instances of CimInstance. CimInstance is different from the object returned by Get-WmiObject. &lt;/p&gt; &lt;p&gt;b. __Properties are no longer mixed with properties of an instance.&lt;/p&gt; &lt;p&gt;c. Reduce memory and on-the-wire footprint by allowing retrieval of a subset of properties. &lt;/p&gt; &lt;p&gt;d. Allow retrieval of key properties.&lt;/p&gt; &lt;p&gt;e. Allow creation of in-memory instance to reduce round trips.&lt;/p&gt; &lt;p&gt;f. Allow retrieval of specific instances using in-memory instances or actual instances.&lt;/p&gt; &lt;p&gt;g. DateTime values are returned as objects of System.DateTime type. Old cmdlets treat them as strings.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt; &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;# Get-CimInstance was designed to be similar to the Get-WmiObject&lt;/p&gt; &lt;p&gt;# WMI Cmdlet : Get-WmiObject -class Win32_Process&lt;/p&gt; &lt;p&gt;# WsMan Cmdlet : get-wsmaninstance wmicimv2/win32_process -Enumerate&lt;/p&gt; &lt;p&gt;# The default value of -Namespace is root/cimv2, and the default value of -ComputerName is local computer &lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -Class Win32_Process&lt;/p&gt; &lt;p&gt;# Filtering using WQL&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -Query &amp;quot;SELECT * FROM Win32_Process WHERE Name Like 'power%'&amp;quot; &lt;/p&gt; &lt;p&gt;# use the -Filter parameter with -classname&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -Class Win32_Process -Filter &amp;quot;Name Like 'power%'&amp;quot; &lt;/p&gt; &lt;p&gt;#Retrieving a subset of properties : To reduce memory and on-the-wire footprint&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -Class Win32_Process -Property Name, Handle &lt;/p&gt; &lt;p&gt;#Only get the key properties&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -Class Win32_Process -KeyOnly&lt;/p&gt; &lt;p&gt;########################## Looking into CimInstance #########################&lt;/p&gt; &lt;p&gt;PS:&amp;gt;&amp;#160; $x, $y = Get-CimInstance Win32_Process&lt;/p&gt; &lt;p&gt;PS:&amp;gt;&amp;#160; $x | gm&lt;/p&gt; &lt;p&gt;# The object contains the full CIM class derivation hierarchy&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $x.pstypenames&lt;/p&gt; &lt;p&gt;# The object also has a reference to its class declaration&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $x.CimClass | gm&lt;/p&gt; &lt;p&gt;# DateTime values are returned as strings&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-WmiObject Win32_OperatingSystem | Select *Time*&lt;/p&gt; &lt;p&gt;# DateTime values are returned as System.DateTime&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance Win32_OperatingSystem | Select *Time*#&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;h4&gt;&lt;strong&gt;3. Working with associations&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;Working with associations was not straight forward in the old WMI cmdlets. Customers wanted a way to find out associated instances of a particular instance. To resolve this issue we came up with a cmdlet called Get-CimAssociatedInstance. The following example shows some of the important features of this cmdlet.&lt;/p&gt; &lt;p&gt; &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;# Get instance of Win32_LogicalDisk class with DriveType =3 (hard drives)&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $disk1, $diskn = Get-CimInstance -class Win32_LogicalDisk -Filter 'DriveType = 3'&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $disk1&lt;/p&gt; &lt;p&gt;# Get the all instances associated with this disk&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimAssociatedInstance -CimInstance $disk1&lt;/p&gt; &lt;p&gt;# Get instances of a specific type&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimAssociatedInstance -CimInstance $disk1 -ResultClassName Win32_DiskPartition&lt;/p&gt; &lt;p&gt;# Finding associated instances through a specific CIM relationship &lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimAssociatedInstance -CimInstance $diskn -Association Win32_LogicalDiskRootDirectory&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;h4&gt;&lt;strong&gt;4. Working with methods&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;A large number of tasks in WMI are achieved by invoking methods. The new Invoke-CimMethod makes two things really easy: &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;a. Discovery of method and method parameters&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;b. Execution of methods with parameters. Using feedback from our customers: &lt;a href="https://connect.microsoft.com/PowerShell/feedback/details/624263/invoking-wmi-methods-with-invoke-wmimethod"&gt;Connect bug&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;The following examples show how easy it is to discover and execute methods using Invoke-CimMethod: &lt;/p&gt; &lt;p&gt; &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" width="725" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="723"&gt; &lt;p&gt;PS:&amp;gt; $class = Get-CimClass Win32_Process&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $class.CimClassMethods&lt;/p&gt; &lt;p&gt;# Get the parameters of the Create method&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $class.CimClassMethods[&amp;quot;Create&amp;quot;].Parameters&lt;/p&gt; &lt;p&gt;# Invoke the static Create method on the Win32_Process class to create an instance of the Notepad &lt;/p&gt; &lt;p&gt;# application. Notice that the method parameters are given in a hash table since CIM method arguments&lt;/p&gt; &lt;p&gt;# are unordered by definition. &lt;/p&gt; &lt;p&gt;PS:&amp;gt; Invoke-CimMethod -Class win32_process -MethodName Create -Argument @{CommandLine='notepad.exe';&lt;/p&gt; &lt;p&gt;CurrentDirectory = &amp;quot;c:\windows\system32&amp;quot;}&lt;/p&gt; &lt;p&gt;# Get the owners of the running Notepad instances&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $result = Invoke-CimMethod -Query 'SELECT * FROM Win32_Process WHERE name like &amp;quot;notepad%&amp;quot;' &lt;/p&gt; &lt;p&gt;-MethodName GetOwner&lt;/p&gt; &lt;p&gt;# The result has the returned value and out parameters of the method&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $result&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;h4&gt;&lt;strong&gt;5. CliXML serialization.&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;CimInstance supports full fidelity serialization and deserialization. This is an important feature for those who wish to save state of an instance or result of a cmdlet and then want to use it later. The WMI cmdlets do not support full-fidelity serialization/deserialization. &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;# CimInstances are serialized and deserialized with full fidelity&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $x = Get-CimInstance Win32_Service &lt;/p&gt; &lt;p&gt;PS:&amp;gt; $x&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $x[0].pstypenames&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $x | Export-CliXml t1.xml&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $y = Import-CliXml .\t1.xml&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $y&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $y[0].pstypenames&lt;/p&gt; &lt;p&gt;# The deserialized objects are identical to the ones obtained from the server&lt;/p&gt; &lt;p&gt;PS:&amp;gt; diff ($y) (Get-CimInstance win32_service )&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;h4&gt;&lt;strong&gt;6. Remote management&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;Managing remote machines with the new cmdlets is also pretty simple and straight forward. The two parameters that can be used to manage remote machines are:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;a. ComputerName&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;b. CimSession&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;The following example will explain how these two parameters can be used to manage a remote machine. &lt;/p&gt; &lt;p&gt; &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" width="729" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="727"&gt; &lt;p&gt;PS:&amp;gt; $props = @{v_Key = [UInt64] 8;}&lt;/p&gt; &lt;p&gt;# If ComputerName parameter is used, the cmdlets create an implicit session during the execution.&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $inst = New-CimInstance -ClassName TestClass -Namespace root\test -Key v_Key -Property $props &lt;/p&gt; &lt;p&gt;-ComputerName SecondWin8Server&lt;/p&gt; &lt;p&gt;# Create a session&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $session = New-CimSession –ComputerName SecondWin8Server&lt;/p&gt; &lt;p&gt;# Use the session &lt;/p&gt; &lt;p&gt;PS:&amp;gt; $inst = New-CimInstance -ClassName TestClass -Namespace root\test -Key v_Key -Property $props &lt;/p&gt; &lt;p&gt;–CimSession $session&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; If a large number of remote operations are to be performed then session reuse is highly recommended. This can provide a significant performance gain.&lt;/p&gt; &lt;h4&gt;&lt;strong&gt;7. Easy migration from WMI cmdlets&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;Last, but not the least, a very important aspect is to reduce learning. If you know how to use WMI cmdlets from PowerShell 2.0, you will find learning new CIM cmdlets easy. These cmdlets follow similar patterns as WMI cmdlets -including parameter names and alias. Let’s see how easy or difficult it is to move to new cmdlets &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;&lt;b&gt;# OLD: One liner to get ComputerSystem information&lt;/b&gt;&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-WmiObject Win32_ComputerSystem&lt;/p&gt; &lt;p&gt;&lt;b&gt;# NEW:&lt;/b&gt;&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance Win32_ComputerSystem&lt;/p&gt; &lt;p&gt;# ClassName is position and mandatory.&lt;/p&gt; &lt;p&gt;# Namespace default is root/cimv2 namespace&lt;/p&gt; &lt;p&gt;#WMI Cmdlet – with classnames and Namespace&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-WmiObject –ClassName Win32_Process –Namespace root/cimv2&lt;/p&gt; &lt;p&gt;#CIM cmdlet follows the same pattern&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance –ClassName Win32_Process –Namespace root/cimv2&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;The table below shows the list of WMI cmdlets and their CIM equivalent: &lt;table border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;&lt;b&gt;Old cmdlet&lt;/b&gt;&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;&lt;b&gt;New Cmdlet&lt;/b&gt;&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Get-WmiObject&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Get-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Get-WmiObject -list&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Get-CimClass&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Set-WmiInstance&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Set-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Set-WmiInstance –PutType CreateOnly&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;New-CimInstance&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Remove-WmiObject&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Remove-CimInstance &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Invoke-WmiMethod&lt;/p&gt; &lt;/td&gt; &lt;td valign="top" width="319"&gt; &lt;p&gt;Invoke-CimMethod&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;&lt;b&gt;Note: &lt;/b&gt;In old cmdlets Set-WmiInstance was used to perform update and create operations. The new cmdlets clearly define the distinction between the two operations i.e. New-CimInstance is used to create an instance and Set-CimInstance is used to update an existing instance.&lt;/p&gt; &lt;p&gt;You will also notice that in some places we have broken this rule – and script using WMI cmdlet can’t be simply changed to CIM cmdlet by changing the cmdlet name. e.g. &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;&lt;b&gt;# OLD:&lt;/b&gt;&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Invoke-WMIMethod -class Win32_Process -Name create -ArgumentList 'calc.exe'&lt;/p&gt; &lt;p&gt;&lt;b&gt;# NEW:&lt;/b&gt;&lt;/p&gt; &lt;p&gt;PS:&amp;gt;Invoke-CimMethod Win32_Process -MethodName create -Arguments @{CommandLine='calc.exe'}&lt;/p&gt; &lt;p&gt;New Cmdlet takes a hash table or ordered dictionary as input not an Object.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;The rule here is, if the WMI cmdlet experience is not ideal, we don’t want to carry it forward. It’s better to break a bad experience (like in the example given above)&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;&lt;u&gt;Goal 2 - Standard Compliance&lt;/u&gt;&lt;/h3&gt; &lt;p&gt;· CIM cmdlets are modeled on generic CIM operations&lt;/p&gt; &lt;p&gt;· Work over WsMan for remote management, making it possible to manage any server or device that implements WsMan and CIM standard.&lt;/p&gt; &lt;p&gt;· Removes the need to build custom agents and/or protocol to manage complex heterogeneous environments&lt;/p&gt; &lt;p&gt;· CIM cmdlets will work seamlessly with the new Open Management Infrastructure. &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/06/28/open-management-infrastructure.aspx"&gt;http://blogs.technet.com/b/windowsserver/archive/2012/06/28/open-management-infrastructure.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The following example shows that CimCmdlets can be used to manage a non-windows device (i.e. an Intel AMT box): &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="638"&gt; &lt;p&gt;# Save credentials in an object&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $cred = Get-Credential -UserName admin&lt;/p&gt; &lt;p&gt;# Create a session with Intel AMT machine.&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $s = New-CimSession -ComputerName $serverAMT -Port 16992 -Authentication Digest -Credential $cred&lt;/p&gt; &lt;p&gt;# Use classname to get instances from an Intel AMT machine.&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -class CIM_ComputerSystem -Namespace interop -CimSession $s&lt;/p&gt; &lt;p&gt;# Use resourceURI to get instances from an Intel AMT machine.&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $resourceURI = “http://intel.com/wbem/wscim/1/amt-schema/1/AMT_GeneralSettings”&lt;/p&gt; &lt;p&gt;PS:&amp;gt; Get-CimInstance -ResourceUri $resourceURI -Namespace interop -CimSession $s&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;h3&gt;&lt;u&gt;&lt;/u&gt;&lt;/h3&gt; &lt;h3&gt;&lt;u&gt;&lt;/u&gt;&lt;/h3&gt; &lt;h3&gt;&lt;u&gt;Goal 3 - Support for down-level OS or non-windows machines&lt;/u&gt;&lt;/h3&gt; &lt;p&gt;CimCmdlets can be used to manage Windows 8, down-level windows machines and any machine that has a CIM standards compliant CIMOM. So, IT pros can now manage non-windows machines with PowerShell in the exact same fashion as they could manage a windows box.&lt;/p&gt; &lt;p&gt;To manage these machines, a CimSession to the machine is required. Once a CimSession is created, the machine can be managed irrespective of the operating system. &lt;/p&gt; &lt;p&gt;WinRM support on down-level windows machines is limited. The latest WMF-V1 release will enable the latest version of WinRM on the down-level machines; this will help our customers in making best use of these new cmdlets. &lt;/p&gt; &lt;p&gt;If customers do not want to install WMF-V1 or do not wish to use WinRM then they can always use DCOM protocol to achieve the same results. &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt; &lt;table style="color: #ffffff" border="1" cellspacing="0" cellpadding="0" width="824" bgcolor="#000066"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="822"&gt; &lt;p&gt;# If ComputerName is specified, WinRM protocol is used&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $serverwin8 = New-CimSession –ComputerName &amp;quot;ServerWin8&amp;quot;&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $serverwin2k8r2 = New-CimSession –ComputerName “Serverwin2k8r2 &amp;quot;&lt;/p&gt; &lt;p&gt;# For a remote machine, if you wish to go over DCOM, you need to explicitly specify &lt;/p&gt; &lt;p&gt;PS:&amp;gt; $sOpt = New-CimSessionOption –Protocol DCOM&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $sessionWin2k8r2Dcom = New-CimSession –ComputerName “Serverwin2k8r2 &amp;quot; –SessionOption $sOpt&lt;/p&gt; &lt;p&gt;# User Experience remains same irrespective of the target machine.&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $instanceServerWin8 = Get-CimInstance –CimSession $ serverwin8&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $instanceServerWin2k8r2 = Get-CimInstance –CimSession $ serverwin2k8r2&lt;/p&gt; &lt;p&gt;PS:&amp;gt; $instanceServerWin2k8r2DCOM = Get-CimInstance –CimSession $ sessionWin2k8r2Dcom&lt;/p&gt; &lt;p&gt;#Note: The results in $instanceServerWin2k8r2 and $instanceServerWin2k8r2DCOM are identical in all aspects. &lt;/p&gt; &lt;p&gt;# Only the protocol used to get them is different.&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt; &lt;p&gt;Our objective is to provide the best user experience to all the IT professionals. We would love to know what you think about these new cmdlets. Please give us your comments below.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Vaibhav Chugh&lt;/p&gt; &lt;p&gt;SDET, WMI&lt;/p&gt; &lt;p&gt;Osama Sajid&lt;/p&gt; &lt;p&gt;Program Manager, WMI&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10343415" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/WMI/">WMI</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CIM/">CIM</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/MI+Client/">MI Client</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CimInstance/">CimInstance</category></item><item><title>New-Workflow –MakeItEasy: Authoring Workflows using PowerShell Extended Syntax</title><link>http://blogs.msdn.com/b/powershell/archive/2012/07/21/new-workflow-makeiteasy-authoring-workflows-using-powershell-extended-syntax.aspx</link><pubDate>Sat, 21 Jul 2012 20:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10332271</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10332271</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/07/21/new-workflow-makeiteasy-authoring-workflows-using-powershell-extended-syntax.aspx#comments</comments><description>&lt;p&gt;Some time back, in his &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/05/30/windows-server-2012-powershell-3-0-and-devops-part-2.aspx"&gt;blog post&lt;/a&gt;, Jeffrey Snover introduced one of the new Windows PowerShell 3.0 feature &amp;ndash; &lt;strong&gt;Windows PowerShell Workflow&lt;/strong&gt;. In that post, you saw a glimpse of how to author workflows using PowerShell syntax. This post dives into more details of authoring workflows using PowerShell syntax and various extensions to it.&lt;/p&gt;
&lt;h2&gt;Why we chose to extend the PowerShell Language for Workflow Authoring&lt;/h2&gt;
&lt;p&gt;As Jeffrey mentioned in that blog post, Windows Workflow Foundation traditionally has been a developer-focused feature that requires Visual Studio and a lot of code to create a solution. To review the solution, another person has to understand XAML or they have to install Workflow Designer. Authoring workflows by using Windows PowerShell is much easier and overcomes the development hurdles. Additionally, you get the benefit of sharing the workflows by simply pasting them into an email or publishing them online.&lt;/p&gt;
&lt;p&gt;Another reason, as pointed out in &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/03/17/when-windows-powershell-met-workflow.aspx"&gt;another blog post&lt;/a&gt;, is our promise to the PowerShell community about learning once and reusing that knowledge over and over again:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;&amp;ldquo; &amp;hellip; We respect your investment in learning Windows PowerShell by reusing concepts over and over to make sure learning Windows PowerShell was the best thing you ever did. &amp;hellip;&amp;rdquo;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While designing the workflow authoring experience, we kept this promise in mind. We also thought of ways to work with existing tools and, hence, came up with two approaches to workflow authoring:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Script-based Workflow Authoring&lt;/b&gt;: Leverage and extend the PowerShell language for workflows so IT Pros can reuse their existing PowerShell scripting skills.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;XAML-based Workflow Authoring:&lt;/b&gt; Plug into the Visual Studio Workflow Designer experience so developers can easily get the management activities in their existing environment and continue leveraging their XAML and Visual Studio knowledge.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This post will dive into details of the former approach for workflow authoring: PowerShell script-based workflows. In a later blog post, we will look into the XAML-based authoring experience.&lt;/p&gt;
&lt;p&gt;Although there are multiple ways to showcase the new script-based workflow experience, we will explain it by using a real-world example: &lt;span style="text-decoration: underline;"&gt;Creating virtual machines on a Hyper-V capable host machine and joining those virtual machines to a domain.&lt;/span&gt; This example is a good workflow sample because it has all the necessary workflow characteristics &amp;ndash; long running task across multiple machines that require robustness due to machine reboots.&lt;/p&gt;
&lt;p&gt;The benefit of this approach is that by the end of this blog, you will have a real-world workflow sample that can easily be used in your environment. &lt;img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5661.wlEmoticon_2D00_smile_5F00_438CBD30.png" /&gt;&lt;/p&gt;
&lt;h2&gt;Workflow Extensions to the PowerShell Language&lt;/h2&gt;
&lt;p&gt;In next couple of sections, we will look at various extensions to the PowerShell language that expose and enable Windows Workflow Foundation concepts.&lt;/p&gt;
&lt;h3&gt;Workflow Keyword&lt;/h3&gt;
&lt;p&gt;The most important of extensions to the PowerShell language is the &lt;b&gt;workflow&lt;/b&gt; keyword. To create a workflow, use the &lt;b&gt;workflow&lt;/b&gt; keyword, followed by a name for the workflow and, then, followed by the body of the workflow, such as:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7536.Invoke_2D00_HelloWorld_5F00_2A59F1EC.png"&gt;&lt;img width="255" height="51" title="Invoke-HelloWorld" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Invoke-HelloWorld" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8625.Invoke_2D00_HelloWorld_5F00_thumb_5F00_5128082C.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, if you know how to write a PowerShell function, you are 80% on the way to being able to write a workflow.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Note: The behavior of a workflow is different than a function and it has a few more rules that we will delve into in another blog post soon.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;After knowing how easy it is to create a workflow, let&amp;rsquo;s build our workflow for creating virtual machines (VM). We will name it &lt;b&gt;Install-VM&lt;/b&gt; &amp;ndash; using a verb-noun name just like those of any other PowerShell command. We will add parameters to our workflow that will specify virtual hard disk (VHD) location for VMs, default prefix for VM name and the number of VM to create.&lt;/p&gt;
&lt;p&gt;&lt;a name="DefinitionAndParam"&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2211.Install_2D00_VM_2D00_Param_5F00_39244B47.png"&gt;&lt;img width="414" height="176" title="Install-VM-Param" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Install-VM-Param" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0181.Install_2D00_VM_2D00_Param_5F00_thumb_5F00_1FBC480D.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;i&gt;Note: As you might notice, in Windows PowerShell Workflow, you can specify default values for the parameters, just like you do in functions.&lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the example above, notice that Windows PowerShell ISE recognizes the workflow and its content and colorizes them appropriately, just like it does for any other PowerShell command.&lt;/p&gt;
&lt;h3&gt;&lt;a name="ParallelExecution"&gt;&lt;/a&gt;Parallel Execution&lt;/h3&gt;
&lt;p&gt;The underlying Windows Workflow Foundation runtime supports running activities or commands in parallel. We expose this capability in Windows PowerShell Workflow through the &lt;b&gt;parallel&lt;/b&gt; keyword, as well as &lt;b&gt;foreach-paralle&lt;/b&gt;l, an enhancement to the ForEach statement. With parallel execution, you can significantly reduce the operation time across a set of machines.&lt;/p&gt;
&lt;p&gt;Additionally, to execute a collection of activities or commands in order (not in parallel) within a &lt;b&gt;parallel &lt;/b&gt;block, use the &lt;b&gt;sequence &lt;/b&gt;block, such as:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3480.Invoke_2D00_ParallelWorkflow_5F00_1CBF83AF.png"&gt;&lt;img width="432" height="250" title="Invoke-ParallelWorkflow" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Invoke-ParallelWorkflow" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4073.Invoke_2D00_ParallelWorkflow_5F00_thumb_5F00_0E810ABF.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s go back to our &lt;a href="#DefinitionAndParam"&gt;previous Install-VM&lt;/a&gt; workflow. We'll use a &lt;b&gt;foreach &amp;ndash;parallel &lt;/b&gt;block to add logic for creating VMs in parallel.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;a name="CreateVM"&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0312.Install_2D00_VM_2D00_ForeachParallel_5F00_48237A7A.png"&gt;&lt;img width="547" height="310" title="Install-VM-ForeachParallel" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Install-VM-ForeachParallel" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8814.Install_2D00_VM_2D00_ForeachParallel_5F00_thumb_5F00_195DC1D8.png" border="0" /&gt;&lt;/a&gt;&lt;/i&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;i&gt;Note: In order to call &lt;b&gt;New-VM&lt;/b&gt; and &lt;b&gt;New-VHD&lt;/b&gt; commands, you need to install Hyper-V module.&lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Checkpoint Workflow Execution&lt;/h3&gt;
&lt;p&gt;Windows Workflow Foundation allows a workflow to persist or checkpoint all aspects of its state by using an explicit call to the &lt;b&gt;Persist&lt;/b&gt; activity. The same feature is exposed through the &lt;b&gt;Checkpoint-Workflow&lt;/b&gt; command in Windows PowerShell Workflow.. With the use of &lt;b&gt;Checkpoint-Workflow,&lt;/b&gt; Window PowerShell Workflow checkpoints the workflow state and saves the workflow data to the persistence store. In case of unintended interruptions (machine reboot, process crash, network disruption, etc.), the workflow execution resumes from the last persistence point. Alternatively, to achieve similar results, you can add &lt;b&gt;-PSPersist $true&lt;/b&gt; at the end of an activity or command.&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s add a &lt;b&gt;Checkpoint-Workflow&lt;/b&gt; call to our &lt;a href="#CreateVM"&gt;previous Install-VM&lt;/a&gt; workflow to save the workflow state.&lt;/p&gt;
&lt;p&gt;&lt;a name="SaveWorkflowState"&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3225.Install_2D00_VM_2D00_Checkpoint_5F00_6746C189.png"&gt;&lt;img width="413" height="160" title="Install-VM-Checkpoint" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Install-VM-Checkpoint" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3301.Install_2D00_VM_2D00_Checkpoint_5F00_thumb_5F00_0E14D7CA.png" border="0" /&gt;&lt;/a&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;i&gt;Note: Just look at the &lt;b&gt;param&lt;/b&gt; and &lt;b&gt;foreach &amp;ndash;parallel&lt;/b&gt; block above and you will notice another cool ISE feature: &lt;/i&gt;&lt;i&gt;collapsible regions.&lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;a name="InlineScript"&gt;&lt;/a&gt;InlineScript: Running Isolated Blocks of Windows PowerShell Script&lt;/h3&gt;
&lt;p&gt;By default, each command in a workflow is executed with no PowerShell state sharing. Variables created by one command are not visible to the next command. But, by using the &lt;b&gt;inlineScript&lt;/b&gt; keyword it is possible to execute a collection of PowerShell commands as a single execution unit&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2313.Invoke_2D00_InlineScript_5F00_4DDEBE4F.png"&gt;&lt;img width="310" height="128" title="Invoke-InlineScript" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Invoke-InlineScript" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8664.Invoke_2D00_InlineScript_5F00_thumb_5F00_74ACD48F.png" border="0" /&gt;&lt;/a&gt;&lt;/i&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;i&gt;Note: As mentioned in section 5 of &lt;/i&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/06/19/high-level-architecture-of-windows-powershell-workflow-part-2.aspx"&gt;&lt;i&gt;PowerShell Workflow architecture&lt;/i&gt;&lt;/a&gt;&lt;i&gt;, for reliability reasons, by default, &lt;b&gt;inlineScript&lt;/b&gt; runs in a separate process&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;a name="UsingWithVariables"&gt;&lt;/a&gt;Accessing Workflow Variables from Different Execution Scopes&lt;/h3&gt;
&lt;p&gt;Just like PowerShell remoting in PowerShell 3.0, Windows PowerShell Workflow supports the &lt;b&gt;$Using:&amp;lt;variable name&amp;gt; &lt;/b&gt;scope modifier. This new scope modifier can access workflow variables into the context of an &lt;a href="#InlineScript"&gt;inlineScript&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Unlike PowerShell, Windows Workflow Foundation does not support dynamic scoping of variables. This means that a variable that is defined in the parent scope cannot be redefined in a child scope. In Windows PowerShell Workflow, to change a workflow-scoped variable from any inner scope, use the &lt;b&gt;$workflow:&amp;lt;variable name&amp;gt; &lt;/b&gt;scope modifier.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7674.Invoke_2D00_WithUsingandWorkflowScope_5F00_0689685D.png"&gt;&lt;img width="600" height="285" title="Invoke-WithUsingandWorkflowScope" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Invoke-WithUsingandWorkflowScope" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3225.Invoke_2D00_WithUsingandWorkflowScope_5F00_thumb_5F00_7AF3AB1D.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now, we will use our new &lt;a href="#ParallelExecution"&gt;foreach -parallel&lt;/a&gt;, &lt;a href="#InlineScript"&gt;inlineScript&lt;/a&gt; and &lt;a href="#UsingWithVariables"&gt;$using&lt;/a&gt; concepts, to update our &lt;a href="#SaveWorkflowState"&gt;previous Install-VM&lt;/a&gt;&lt;b&gt; &lt;/b&gt;workflow by adding logic for starting the VMs and getting their IP addresses in parallel.&lt;/p&gt;
&lt;p&gt;&lt;a name="StartVMandWaitForIP"&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4743.Install_2D00_VM_2D00_VMIPAddress_5F00_45B18082.png"&gt;&lt;img width="579" height="565" title="Install-VM-VMIPAddress" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Install-VM-VMIPAddress" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1425.Install_2D00_VM_2D00_VMIPAddress_5F00_thumb_5F00_12E17A0E.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;i&gt;Note: All the commands in workflow have a &lt;b&gt;&amp;ndash;DisplayName&lt;/b&gt; common parameter to provide a custom or friendly name for the command. In the previous example, we used it on &lt;b&gt;inlineScript&lt;/b&gt;.&lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Suspending a Workflow from within the workflow&lt;/h3&gt;
&lt;p&gt;Windows PowerShell Workflow has a &lt;b&gt;Suspend-Workflow&lt;/b&gt; command that suspends the workflow during its execution. This command gives the workflow author complete control over the workflow suspension behavior independent of the workflow user. For example, a workflow can detect a problem that requires manual intervention, notify the operator of this condition, and then suspend operations until the operator corrects the situation and resumes the workflow.&lt;/p&gt;
&lt;p&gt;Let us update our &lt;a href="#StartVMandWaitForIP"&gt;previous Install-VM&lt;/a&gt;&lt;b&gt; &lt;/b&gt;workflow to send an email to a senior admin and suspend itself. Once the senior admin gets the email, he/she can resume the workflow manually.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5633.Install_2D00_VM_2D00_Suspend_5F00_725A3A5B.png"&gt;&lt;img width="660" height="410" title="Install-VM-Suspend" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Install-VM-Suspend" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8053.Install_2D00_VM_2D00_Suspend_5F00_thumb_5F00_641BC16B.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Additionally, you can integrate the workflow execution with the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/hh880865(v=vs.85).aspx"&gt;Management Odata IIS Extension feature&lt;/a&gt; of Windows Server 2012 to manage workflows from any Windows or non-Windows device that can understand HTTP requests. The PowerShell team demonstrated this feature at TechEd North America and TechEd Europe 2012. You can see a recording of this session &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/WSV414"&gt;here&lt;/a&gt; (look at the 1:03:17 mark).&lt;/p&gt;
&lt;h3&gt;Workflow Calling Workflow&lt;/h3&gt;
&lt;p&gt;This feature of Windows PowerShell Workflow enables you to re-use workflows to create higher-level workflows, while leveraging your existing workflow investment, workflows from other users, and workflows from the PowerShell Community. To use this feature, the child workflow (e.g. &lt;b&gt;Join-Domain&lt;/b&gt;) must be defined and imported into the PowerShell session in which the parent workflow is defined..&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s define a &lt;b&gt;Join-Domain&lt;/b&gt; workflow that joins a machine to a domain. To complete the scenario, we will call &lt;b&gt;Join-Domain&lt;/b&gt; from our &lt;b&gt;Install-VM &lt;/b&gt;workflow.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5047.Join_2D00_Domain_5F00_38A092DA.png"&gt;&lt;img width="673" height="230" title="Join-Domain" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Join-Domain" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6102.Join_2D00_Domain_5F00_thumb_5F00_6378F6EC.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Updated &lt;b&gt;Install-VM &lt;/b&gt;workflow looks like as follows (and script is attached at the end of the blog post):&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4718.Install_2D00_VM_2D00_WithJoin_2D00_Domain_5F00_182B60EA.png"&gt;&lt;img width="692" height="660" title="Install-VM-WithJoin-Domain" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Install-VM-WithJoin-Domain" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1184.Install_2D00_VM_2D00_WithJoin_2D00_Domain_5F00_thumb_5F00_45404DB8.png" border="0" /&gt;&lt;/a&gt;&lt;/i&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;i&gt;NOTE: Notice that the param block of &lt;b&gt;Install-VM&lt;/b&gt; has two additional parameters: $domainCred and $localCred. The &lt;b&gt;Join-Domain&lt;/b&gt; workflow needs these values. &lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Additionally, you can define nested functions or nested workflows inside the workflows as well, such as:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5635.Invoke_2D00_NestedCommand_5F00_7AFA92E7.png"&gt;&lt;img width="393" height="270" title="Invoke-NestedCommand" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Invoke-NestedCommand" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4152.Invoke_2D00_NestedCommand_5F00_thumb_5F00_4FB5FBE0.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Finding and Running Your Workflow&lt;/h3&gt;
&lt;p&gt;As explained by Mir Rosenberg in an &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/03/17/when-windows-powershell-met-workflow.aspx"&gt;earlier blog post&lt;/a&gt;, Windows PowerShell Workflows behave just like other Windows PowerShell commands. You can discover them by using &lt;b&gt;Get-Command:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7382.Get_2D00_Command_5F00_287BB2AB.png"&gt;&lt;img width="585" height="190" title="Get-Command" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Get-Command" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5314.Get_2D00_Command_5F00_thumb_5F00_410B4FFB.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can run them interactively or use the &lt;b&gt;AsJob &lt;/b&gt;common parameter of workflows to run any workflow as a background job.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7610.Invoke_2D00_Install_2D00_VM_5F00_182338EC.png"&gt;&lt;img width="591" height="32" title="Invoke-Install-VM" style="margin: 0px 0px 0px 30px; border: 0px currentcolor; display: inline; background-image: none;" alt="Invoke-Install-VM" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3312.Invoke_2D00_Install_2D00_VM_5F00_thumb_5F00_3EF14F2C.png" border="0" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7115.InvokeAsJob_2D00_Install_2D00_VM_5F00_13ACB825.png"&gt;&lt;img width="706" height="42" title="InvokeAsJob-Install-VM" style="margin: 0px 0px 0px 30px; display: inline; background-image: none;" alt="InvokeAsJob-Install-VM" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0172.InvokeAsJob_2D00_Install_2D00_VM_5F00_thumb_5F00_3E851C37.png" border="0" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;h3&gt;Join-In&lt;/h3&gt;
&lt;p&gt;Now that you know how easy it is to author workflows using PowerShell syntax, please try your hand at creating couple of workflows for long-running multi-machine scenarios and tell us about your experience (and feature requests J ). As always, you can send feedback directly to us by using the &lt;a href="http://connect.microsoft.com/powershell"&gt;Windows PowerShell Connect site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While we create our next set of blog posts about Windows PowerShell Workflow, enjoy some additional resources about Windows PowerShell 3.0 and Windows PowerShell Workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-workflow-flagship-feature-140712"&gt;PowerShell v3: Workflow is the Flagship Feature&lt;/a&gt; (by Don Jones &amp;ndash; PowerShell MVP)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://halr9000.com/article/947"&gt;PowerShell Workflow, Defined&lt;/a&gt; (by Hal Rottenberg &amp;ndash; PowerShell MVP)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/library/hh847767.aspx"&gt;PowerShell Workflow module&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.powershell.workflow(v=VS.85).aspx"&gt;PowerShell Workflow SDK documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh852738(v=vs.85).aspx"&gt;Authoring a Workflow using PowerShell Activities&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hemant Mahawar [MSFT] &lt;br /&gt;Senior Program Manager &lt;br /&gt;Windows PowerShell&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10332271" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-33-22-71/Install_2D00_VM.psm1" length="5138" type="application/octet-stream" /><category domain="http://blogs.msdn.com/b/powershell/archive/tags/LANGUAGE/">LANGUAGE</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CMDLET/">CMDLET</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Get_2D00_Command/">Get-Command</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell/">PowerShell</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Functions/">Functions</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Workflow/">Workflow</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Workflow/">PowerShell Workflow</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Getting+Started/">Getting Started</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Powershell+3-0/">Powershell 3.0</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>Windows PowerShell Web Access - Installation guide II</title><link>http://blogs.msdn.com/b/powershell/archive/2012/07/18/windows-powershell-web-access-install.aspx</link><pubDate>Wed, 18 Jul 2012 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10330330</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10330330</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/07/18/windows-powershell-web-access-install.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small; font-family: arial, helvetica, sans-serif;"&gt;&lt;span face="Calibri"&gt;This blog is a continuation of the post on &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/06/27/windows-powershell-web-access-basic-installation-guide.aspx"&gt;&lt;span style="color: #0000ff;" face="Calibri" color="#0000ff"&gt;Basic installation guide for PowerShell Web Access&lt;/span&gt;&lt;/a&gt;&lt;span face="Calibri"&gt;. In the basic installation blog, we configured IIS with the default values used by the Install-PswaWebApplication cmdlet. This is the simplest way to install and configure the feature. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;" face="Calibri"&gt;The video below illustrates two more ways to configure IIS &amp;ndash;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-size: small; font-family: arial, helvetica, sans-serif;"&gt;&lt;b&gt;&lt;span face="Calibri"&gt;1. Using Install-PswaWebApplication&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this case we specify values for &amp;ndash;WebSiteName and &amp;ndash;WebApplication parameters for the cmdlet&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-size: small; font-family: arial, helvetica, sans-serif;"&gt;&lt;b&gt;&lt;span face="Calibri"&gt;2. &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span face="Calibri"&gt;Using the GUI equivalent&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this case, we use IIS Manager to configure the website and the web application pool. &lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small; font-family: arial, helvetica, sans-serif;"&gt;&lt;span face="Calibri"&gt;Detailed instructions on different ways to configure IIS can also be found in the &lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/library/hh831611.aspx#BKMK_config"&gt;&lt;span style="color: #0000ff;" face="Calibri" color="#0000ff"&gt;Windows PowerShell Web Access help document&lt;/span&gt;&lt;/a&gt;&lt;span face="Calibri"&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small; font-family: arial, helvetica, sans-serif;"&gt;&lt;span face="Calibri"&gt;The video also briefly describes how the events are logged for &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/03/07/introducing-windows-powershell-web-access-in-windows-server-8-beta.aspx"&gt;&lt;span style="color: #0000ff;" face="Calibri" color="#0000ff"&gt;PowerShell Web Access&lt;/span&gt;&lt;/a&gt;&lt;span face="Calibri"&gt;. Admins can use this information to troubleshoot login failures.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;script src="http://technet.microsoft.com/en-us/videoembed/installation-guide-it-for-windows-powershell-web-access" type="text/javascript"&gt;&lt;/script&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small; font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;"&gt;Kriti Jindal&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;"&gt;Program Manager&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;"&gt;Windows PowerShell Web Access&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif; font-size: small;"&gt;Microsoft Corporation&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10330330" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server/">Windows Server</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Web+Access/">PowerShell Web Access</category></item><item><title>Join-Object</title><link>http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx</link><pubDate>Fri, 13 Jul 2012 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10329770</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10329770</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/07/13/join-object.aspx#comments</comments><description>&lt;h1&gt;&lt;span style="color: #000080; font-family: arial,helvetica,sans-serif;"&gt;Problem:&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;How do I join two lists of objects into a single list? Or the equivalent: How do I join two CSV files into a single one?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Note that joining makes sense only when the two lists or CSV files have something in common.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color: #000080; font-family: arial,helvetica,sans-serif;"&gt;Why do we need Join?&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;If &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;you know why you need join would not enjoy a review of basic database concepts, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;feel free to skip this section.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Say &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;you own a company and want to keep track of the time when your employees &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;arrive. A simplified table of employees could look like this:&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="107" colspan="2"&gt;
&lt;p align="center"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Employee&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p style="text-align: right;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Id&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;3&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Hanna&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;id uniquely identifies an employee because two employees can have the same &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;name. A full table would have more employees. It would also have last name, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;first name, the date the employee joined the company, and other columns.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Entrance table that contains each employee's arrival time might look like this:&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="332" colspan="2"&gt;
&lt;p align="center"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Entrance&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p style="text-align: right;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Employee&amp;nbsp; Id&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;44&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2/29/2012 01:00:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &amp;ldquo;When&amp;rdquo; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;column has both the date and the time. Types like DateTime are common for .Net &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Objects and databases.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;We can &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;conclude the following from the data:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;(the employee with id 1) seems to arrive early; at around 8.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;(the employee with id 2) is not a morning person (I like him already).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mary &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;is more of a &amp;ldquo;work from home&amp;rdquo; kind of person. She has never entered the company &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;headquarters.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;What &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;about the Employee with id 44? There is no such employee in our table! And what &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;nefarious thing was he doing at 1:00 am on February 29? I wonder if he will be coming &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;back in 4 years&amp;hellip; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Employee &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;44 seems to be a mistake. Maybe the data was entered incorrectly. In some &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;databases, you can use &amp;ldquo;referential integrity&amp;rdquo; to make sure that such mistakes &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;never make into your table data. Obviously, this system doesn't have a check &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;like that.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Wait &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;a minute, why do we have two tables instead of one? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;A simple one-table solution &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;might look like this:&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="332" colspan="2"&gt;
&lt;p align="center"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Employee Entrance&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Employee&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Before &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;throwing stones at this solution, I should say this could work for the simplest &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;of cases. As we are going to see below, it doesn&amp;rsquo;t work if things get a bit &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;more complex, so it is not future-proof. Now, for more specific stones:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;In &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;the table above, John&amp;rsquo;s 3 entrances and Mark&amp;rsquo;s 2 entrances are recorded, but I &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;omitted the Entrance for id 44 that we used to have, because he doesn&amp;rsquo;t have a &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;name. If we consider that we can have 2 Johns working for the company, we will &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;need an ID, as seen below. We can also have more data for each employee, like &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;their Last Name:&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="504" colspan="4"&gt;
&lt;p align="center"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Employee Entrance&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="41"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Id&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112"&gt;
&lt;p style="text-align: right;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;First Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114"&gt;
&lt;p style="text-align: right;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Last Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231" valign="top"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="41"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Smith&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="41"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Smith&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="41"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Smith&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="41"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;West&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="41"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="112"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="114"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;West&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;This re&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;petition of first name and last name is one of the reasons we have two &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;tables. Having two tables allows us to have an Entrance Table, where we repeat &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;just the Employee Id, a small amount of data. This way, the tables can evolve &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;separately. If we start adding columns for Employees, like Address, Phone, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;etc., nothing changes in the Entrance table.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;There &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;is one more fundamental reason to have two tables. Say we want to start keeping &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;track of employee payments. If the employees are in the same table as their entrance, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;how do add the payments? It clearly does not fit in the same table, because &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;there would be multiple payments per employee and there are already multiple &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;employee entries for their entrances.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;proper way to express the concept of one of Employee and multiple entrances is &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;to have two tables. Then, it is going to be simple to add columns to the &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Employee table or add another table for their multiple payments. Another way to &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;say this is that a one-to-many relationship, like one employee to many payments, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;or one employee to many entrances, needs a separate table. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;It &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;turns out that problems we can easily describe conceptually can often require many &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;tables.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;For &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;example, let&amp;rsquo;s consider keeping track of sales at a fruit stand. That seems &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;simple enough conceptually, but let&amp;rsquo;s see what is involved in this task. We &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;have customers, fruit (our product), and sales. Each sale receipt has one or &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;more lines, in which each line describes a product and its quantity. The tables &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;we have are:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The customer table with name, delivery address, phone, etc.&lt;/li&gt;
&lt;li&gt;The product table with name, price, etc.&lt;/li&gt;
&lt;li&gt;The sales table with date and customer.&lt;/li&gt;
&lt;li&gt;The sale item table with the sale (id), product (id) and quantity.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The information on a customer receipt would be gathered from all 4 tables and we would need to join this information from multiple tables.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;If &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;even simple conceptual problems require many tables, joining tables becomes a &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;fundamental need, which brings us to the next section.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color: #000080; font-family: arial,helvetica,sans-serif;"&gt;The different types of Joins&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Let&amp;rsquo;s look &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;at our entrance data again.&lt;/span&gt;&lt;/p&gt;
&lt;table style="width: 560px; height: 362px;" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;table style="margin-right: auto; margin-left: auto;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="50" colspan="2"&gt;
&lt;p align="center"&gt;&lt;b&gt;Employee&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p style="text-align: right;"&gt;&lt;b&gt;Id&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75" style="text-align: center;"&gt;
&lt;p&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p align="right"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75" style="text-align: center;"&gt;
&lt;p&gt;John&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p align="right"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75" style="text-align: center;"&gt;
&lt;p&gt;Mark&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="30"&gt;
&lt;p align="right"&gt;3&lt;/p&gt;
&lt;/td&gt;
&lt;td width="75" style="text-align: center;"&gt;
&lt;p&gt;Hanna&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;table style="margin-right: auto; margin-left: auto;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="332" colspan="2"&gt;
&lt;p align="center"&gt;&lt;b&gt;Entrance&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p style="text-align: right;"&gt;&lt;b&gt;Employee&amp;nbsp; Id&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;&lt;b&gt;When&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;6/12/2012 08:05:01 AM&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;6/13/2012 07:59:12 AM&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;6/14/2012 07:49:10 AM&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;6/12/2012 10:33:00 AM&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;6/13/2012 10:15:00 AM&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;44&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225" style="text-align: center;"&gt;
&lt;p&gt;2/29/2012 01:00:00 AM&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Now that &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;the tables are separate and future-proof, we might want a view of the data that &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;joins the name and entrance date/time for each employee. This can be done in 4 different &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;ways:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;1) Only the Employees with Entrances and Entrances with an Employee (SQL &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Inner Join)&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;This join shows all &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;the employee entrances except for the Entrance for Employee 44 that has no &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;corresponding Id. It also does not show a line for Hanna because there is no &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;entry for her in the Entrance table.&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;An example &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;of a SQL statement that would perform this join looks like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;SELECT&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee.Name&lt;/b&gt;,&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Entrance.[When]&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;i&gt;INNER JOIN&lt;/i&gt; &lt;b&gt;Entrance&lt;/b&gt; ON &lt;b&gt;Employee.id&lt;/b&gt; =&lt;b&gt; Entrance.EmployeeId&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;i&gt;Select&lt;/i&gt; enumerates the columns, which are &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Name from the Employee table, and When from the Entrance table. The square brackets &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;surrounding &amp;ldquo;&lt;b&gt;[&lt;/b&gt;When&lt;b&gt;]&lt;/b&gt;&amp;rdquo;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;distinguish the &amp;ldquo;When&amp;rdquo;&amp;nbsp; column &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;name from the "When" SQL command. This is required only for SQL &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;language keywords.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Employee is &amp;ldquo;inner &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;joined&amp;rdquo; to Entrance by the statement:&amp;nbsp;Employee.id = Entrance.EmployeeId.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Inner Join is the &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;name SQL gives to this kind of join where an item appears in the result only if &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;the join statement (Employee.id = Entrance.EmployeeId) is true in &lt;strong&gt;both&lt;/strong&gt; tables &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;being joined. Hanna has her ID of 3, but there is no 3 in the Entrance table to &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;make this statement true. Employee 44 has his Entrance but there is no ID in &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;the Employee table corresponding to 44 that would make the statement true.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;2) All Employees (SQL Left Outer Join)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;This join shows all employees, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;including Hanna who has no corresponding entry in the Entrance table.&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Hanna&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The SQL Statement looks like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;SELECT&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee.Name&lt;/b&gt;, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Entrance.[When]&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;i&gt;LEFT OUTER JOIN&lt;/i&gt; &lt;b&gt;Entrance&lt;/b&gt; ON &lt;b&gt;Employee.id = Entrance.EmployeeId&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;only change in this second SQL statement is the use of &amp;ldquo;LEFT OUTER JOIN&amp;rdquo; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;(instead of inner join).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Left &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;refers to the fact that &lt;strong&gt;all&lt;/strong&gt; elements of the left table in &amp;ldquo;Employee LEFT OUTER &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;JOIN Entrance&amp;rdquo; (which is Employee) will appear in the result. &amp;ldquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;OUTER &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;is in opposition to the INNER join and it allows Hanna to be listed even though &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;her Employee.id is not in any of the Entrance&amp;rsquo;s EmployeeIds.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Note: &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Some SQL variants will not use &amp;ldquo;OUTER&amp;rdquo;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;3) All Entrances (SQL Right Outer Join)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;This &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;join has all of the Entrances, including the entry for Employee 44 even &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;though there is no corresponding employee Id for that in the Employee&amp;rsquo;s table.&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2/29/2012 01:00:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The SQL Statement looks like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;SELECT&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee.Name&lt;/b&gt;, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Entrance.[When]&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;i&gt;RIGHT OUTER JOIN&lt;/i&gt; &lt;b&gt;Entrance&lt;/b&gt; ON &lt;b&gt;Employee.id = Entrance.EmployeeId&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;only change to the previous join SQL statement is the use of &amp;ldquo;RIGHT&amp;rdquo; instead of &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&amp;ldquo;LEFT&amp;rdquo;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Right &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;refers to the fact that all elements of the left table in &amp;ldquo;Employee RIGHT OUTER &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;JOIN Entrance&amp;rdquo; (which is Entrance) will appear in the result. &amp;ldquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Note: &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Some SQL variants will not use &amp;ldquo;OUTER&amp;rdquo;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;4) All Entrances and Employees (SQL Full Join)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;join below shows all employees and all entrances, including Employees with no &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;corresponding entrances (Hanna) or entrances with no corresponding employee &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;(the entrance for Employee 44).&lt;/span&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;When&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 08:05:01 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 07:59:12 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;John&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/14/2012 07:49:10 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/12/2012 10:33:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Mark&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;6/13/2012 10:15:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Hanna&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="225"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;2/29/2012 01:00:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The SQL Statement looks like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;SELECT&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee.Name&lt;/b&gt;, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Entrance.[When]&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Employee&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;i&gt;FULL OUTER JOIN&lt;/i&gt; &lt;b&gt;Entrance&lt;/b&gt; ON &lt;b&gt;Employee.id = Entrance.EmployeeId&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;only change to the previous join the use of &amp;ldquo;FULL&amp;rdquo; instead of &amp;ldquo;RIGHT&amp;rdquo; or &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&amp;ldquo;LEFT&amp;rdquo;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Full &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;refers to the fact that all elements of both join sides (Employee and Entrance &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;specified in &amp;ldquo;Employee FULL OUTER JOIN Entrance&amp;rdquo;) will appear in the result. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Note: &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Some SQL variants will not use &amp;ldquo;OUTER&amp;rdquo;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color: #000080; font-family: arial,helvetica,sans-serif;"&gt;Join in Windows PowerShell&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;There is no built-in &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;cmdlet for joining in Windows PowerShell, so the remainder of this post will be &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;about building a cmdlet called Join-Object that performs the four join &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;operations in lists of objects in memory. Those objects can come from different &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;places, including csv files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;For example, lets create a couple &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;of CSV files that contain the sample data we have been using:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;@"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Id,Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1,John&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;2,Mark&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;3,Hanna&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;"@ &amp;gt; c:\temp\employee.csv&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;@"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;EmployeeId,When&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1,6/12/2012 08:05:01 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1,6/13/2012 07:59:12 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1,6/14/2012 07:49:10 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;2,6/12/2012 10:33:00 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;2,6/13/2012 10:15:00 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;44,2/29/2012 01:00:00 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;"@ &amp;gt; c:\temp\entrance.csv&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;$employee = Import-Csv c:\temp\employee.csv&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;$entrance = Import-Csv c:\temp\entrance.csv&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;After running these commands, we &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;have:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\temp&amp;gt; $employee&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;--&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hanna&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;And:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\temp&amp;gt; $entrance&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;EmployeeId&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;----------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 08:05:01 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 07:59:12 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/14/2012 07:49:10 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 10:33:00 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 10:15:00 AM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/29/2012 01:00:00 AM&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;I chose CSV because you can find &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;data to be joined in CSV files and also because it&amp;rsquo;s a compact way to show the sample &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Below are 4 calls to the Join-Object&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;that produce the equivalent of the 4 types of join.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\temp&amp;gt; Join-Object -Left $employee -Right $entrance -Where {$args[0].Id -eq $args[1].EmployeeId} &amp;ndash;LeftProperties "Name" &amp;ndash;RightProperties "When" -Type OnlyIfInBoth&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 08:05:01 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 07:59:12 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/14/2012 07:49:10 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 10:33:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 10:15:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Join-Object&amp;rsquo;s first &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;two parameters are the left and right lists of objects.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The &amp;ldquo;Where&amp;rdquo; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;parameter is the join condition, and it uses $args[0] to represent an item from &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;the left list and $args[1] for an item in the right list.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The RightProperties &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;and LeftProperties parameters are the names of the properties to appear in the &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;output from the left list and right list.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;The Type parameter &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;is one of four names: AllInLeft, AllInRight, OnlyIfInBoth and AllInBoth. I &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;thought those four names were simpler to relate to their functionality than &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;SQL&amp;rsquo;s &lt;i&gt;full&lt;/i&gt;, &lt;i&gt;inner&lt;/i&gt; and &lt;i&gt;outer&lt;/i&gt; names, &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;but here is a mapped correspondence:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="float: left;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;Join-Object&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="129"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;b&gt;SQL&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;AllInLeft&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="129"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Left Outer&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;AllIInRight&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="129"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Right Outer&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;OnlyIfInBoth&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="129"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Inner&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="105"&gt;
&lt;p align="right"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;AllInBoth&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="129"&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Full Outer&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Here is an example of AllInLeft:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\temp&amp;gt; Join-Object -Left $employee -Right $entrance -Where {$args[0].Id -eq $args[1].EmployeeId} -LeftProperties "Name" -RightProperties "When" -Type AllInLeft&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 08:05:01 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 07:59:12 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/14/2012 07:49:10 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 10:33:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 10:15:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Hanna&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Here is the output of AllInRight:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\temp&amp;gt; Join-Object -Left $employee -Right $entrance -Where {$args[0].Id -eq $args[1].EmployeeId} -LeftProperties "Name" -RightProperties "When" -Type AllInRight&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 08:05:01 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 07:59:12 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/14/2012 07:49:10 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 10:33:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 10:15:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/29/2012 01:00:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;And finally, the output of AllInBoth:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\temp&amp;gt; Join-Object &amp;ndash;Left $employee &amp;ndash;Right $entrance &amp;ndash;Where {$args[0].Id -eq $args[1].EmployeeId} &amp;ndash;LeftProperties "Name" &amp;ndash;RightProperties "When" -Type AllInBoth&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 08:05:01 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 07:59:12 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/14/2012 07:49:10 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/12/2012 10:33:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Mark&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6/13/2012 10:15:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Hanna&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/29/2012 01:00:00 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color: #000080; font-family: arial,helvetica,sans-serif;"&gt;Conclusions&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Join &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;is an essential tool for data centric problems because, usually, multiple &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;tables are necessary.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Data &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;centric problems are normally handled by database tools, but if you happen to &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;have CSV files with this kind of data, Join-Object might be useful.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Lucio Silveira [MSFT]&lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;&lt;span style="color: #000080;"&gt;The Join-Object Script&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;function AddItemProperties($item, $properties, $output)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($item -ne $null)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($property in $properties)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $propertyHash =$property -as [hashtable]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($propertyHash -ne $null)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $hashName=$propertyHash["name"] -as [string]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($hashName -eq $null)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw "there should be a string Name"&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $expression=$propertyHash["expression"] -as [scriptblock]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($expression -eq $null)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw "there should be a ScriptBlock Expression"&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_=$item&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $expressionValue=&amp;amp; $expression&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output | add-member -MemberType "NoteProperty" -Name $hashName -Value $expressionValue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # .psobject.Properties allows you to list the properties of any object, also known as "reflection"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($itemProperty in $item.psobject.Properties)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($itemProperty.Name -like $property)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output | add-member -MemberType "NoteProperty" -Name $itemProperty.Name -Value $itemProperty.Value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;function WriteJoinObjectOutput($leftItem, $rightItem, $leftProperties, $rightProperties, $Type)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output = new-object psobject&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($Type -eq "AllInRight")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # This mix of rightItem with LeftProperties and vice versa is due to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # the switch of Left and Right arguments for AllInRight&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItemProperties $rightItem $leftProperties $output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItemProperties $leftItem $rightProperties $output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItemProperties $leftItem $leftProperties $output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItemProperties $rightItem $rightProperties $output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;lt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;.Synopsis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; Joins two lists of objects&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;.DESCRIPTION&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; Joins two lists of objects&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;.EXAMPLE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; Join-Object $a $b "Id" ("Name","Salary")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;#&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;function Join-Object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CmdletBinding()]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [OutputType([int])]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Param&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # List to join with $Right&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory=$true,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position=0)]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [object[]]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Left,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # List to join with $Left&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory=$true,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position=1)]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [object[]]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Right,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Condition in which an item in the left matches an item in the right&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # typically something like: {$args[0].Id -eq $args[1].Id}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory=$true,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position=2)]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [scriptblock]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Where,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Properties from $Left we want in the output.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Each property can:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # - Be a plain property name like "Name"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # - Contain wildcards like "*"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # - Be a hashtable like @{Name="Product Name";Expression={$_.Name}}. Name is the output property name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp; and Expression is the property value. The same syntax is available in select-object and it is &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp; important for join-object because joined lists could have a property with the same name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory=$true,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position=3)]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [object[]]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $LeftProperties,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Properties from $Right we want in the output.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Like LeftProperties, each can be a plain name, wildcard or hashtable. See the LeftProperties comments.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory=$true,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position=4)]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [object[]]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $RightProperties,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Type of join. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp; AllInLeft will have all elements from Left at least once in the output, and might appear more than once&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # if the where clause is true for more than one element in right, Left elements with matches in Right are &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # preceded by elements with no matches. This is equivalent to an outer left join (or simply left join) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # SQL statement.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; AllInRight is similar to AllInLeft.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; OnlyIfInBoth will cause all elements from Left to be placed in the output, only if there is at least one&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # match in Right. This is equivalent to a SQL inner join (or simply join) statement.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; AllInBoth will have all entries in right and left in the output. Specifically, it will have all entries&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # in right with at least one match in left, followed by all entries in Right with no matches in left, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # followed by all entries in Left with no matches in Right.This is equivallent to a SQL full join.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory=$false,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position=5)]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ValidateSet("AllInLeft","OnlyIfInBoth","AllInBoth", "AllInRight")]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [string]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Type="OnlyIfInBoth"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Begin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # a list of the matches in right for each object in left&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $leftMatchesInRight = new-object System.Collections.ArrayList&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # the count for all matches&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rightMatchesCount = New-Object "object[]" $Right.Count&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($i=0;$i -lt $Right.Count;$i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rightMatchesCount[$i]=0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($Type -eq "AllInRight")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # for AllInRight we just switch Left and Right&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $aux = $Left&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Left = $Right&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Right = $aux&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # go over items in $Left and produce the list of matches&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($leftItem in $Left)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $leftItemMatchesInRight = new-object System.Collections.ArrayList&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $null = $leftMatchesInRight.Add($leftItemMatchesInRight)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($i=0; $i -lt $right.Count;$i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rightItem=$right[$i]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($Type -eq "AllInRight")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # For AllInRight, we want $args[0] to refer to the left and $args[1] to refer to right,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # but since we switched left and right, we have to switch the where arguments&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $whereLeft = $rightItem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $whereRight = $leftItem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $whereLeft = $leftItem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $whereRight = $rightItem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Invoke-Command -ScriptBlock $where -ArgumentList $whereLeft,$whereRight)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $null = $leftItemMatchesInRight.Add($rightItem)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rightMatchesCount[$i]++&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # go over the list of matches and produce output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($i=0; $i -lt $left.Count;$i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $leftItemMatchesInRight=$leftMatchesInRight[$i]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $leftItem=$left[$i]&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($leftItemMatchesInRight.Count -eq 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($Type -ne "OnlyIfInBoth")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteJoinObjectOutput $leftItem&amp;nbsp; $null&amp;nbsp; $LeftProperties&amp;nbsp; $RightProperties $Type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($leftItemMatchInRight in $leftItemMatchesInRight)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteJoinObjectOutput $leftItem $leftItemMatchInRight&amp;nbsp; $LeftProperties&amp;nbsp; $RightProperties $Type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #produce final output for members of right with no matches for the AllInBoth option&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($Type -eq "AllInBoth")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($i=0; $i -lt $right.Count;$i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rightMatchCount=$rightMatchesCount[$i]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($rightMatchCount -eq 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $rightItem=$Right[$i]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteJoinObjectOutput $null $rightItem $LeftProperties $RightProperties $Type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10329770" width="1" height="1"&gt;</description></item><item><title>Introducing Management OData Schema Designer</title><link>http://blogs.msdn.com/b/powershell/archive/2012/07/11/introducing-management-odata-schema-designer.aspx</link><pubDate>Tue, 10 Jul 2012 23:17:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10328585</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10328585</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/07/11/introducing-management-odata-schema-designer.aspx#comments</comments><description>&lt;p&gt;&lt;font color="#000000" size="3"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;font color="#000000" size="2"&gt;We are excited to introduce the new &lt;/font&gt;&lt;a href="http://archive.msdn.microsoft.com/mgmtODataWebServ/"&gt;&lt;font size="2"&gt;Management OData Schema Designer tool&lt;/font&gt;&lt;/a&gt;&lt;u&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/u&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;font color="#000000" size="2"&gt;The tool’s goal is to accelerate evaluation /development on top of “Management OData IIS Extension” optional Windows Server 2012 feature. A very informative introduction about this feature can be found in the &lt;/font&gt;&lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/03/30/standards-based-management-in-windows-server-8.aspx"&gt;&lt;font size="2"&gt;Standards based management in Windows Server 8&lt;/font&gt;&lt;/a&gt;&lt;span lang="EN" style="mso-ansi-language: en;"&gt;&lt;u&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt; &lt;span lang="EN" style="mso-ansi-language: en;"&gt;by Jeffrey Snover and Wojtek Kozaczynski.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;The new tool has &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;ul&gt; &lt;li&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;a user friendly schema creation experience (as a wizard) &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;custom Management OData endpoint deployment capabilities. &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;schema editing and validation capabilities&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;There are 2 versions available:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;a stand-alone version of the tool: x86/x64 (targeted at ITPros)&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;&lt;i&gt;Prerequisites&lt;/i&gt;:&amp;#160; &lt;/font&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=1366"&gt;&lt;font size="2"&gt;Visual Studio Isolated Shell&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;span style="color: windowtext;"&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;ul&gt; &lt;li&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;a Visual Studio 2010 Ultimate/Pro plugin (the same functionality as the stand-alone tool)&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt;&lt;/font&gt; &lt;p class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="color: rgb(8, 8, 8); line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 8.5pt;"&gt;&lt;font size="2" face="Segoe UI"&gt;Please use it and let us know if it is useful to you via the “Issue tracker”.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Raluca Hera&lt;/font&gt;&lt;/p&gt; &lt;font color="#000000"&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Program Manager, Windows Server Manageability&lt;/font&gt;&lt;/p&gt; &lt;font color="#000000"&gt;&lt;/font&gt; &lt;p&gt;&lt;font color="#000000" size="2"&gt;Microsoft Corporation&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10328585" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>OMI - Open Management Infrastructure to bring the power of PowerShell and standards to devices in your datacenter.</title><link>http://blogs.msdn.com/b/powershell/archive/2012/07/02/omi-open-management-infrastructure-to-bring-the-power-of-powershell-and-standards-to-devices-in-your-datacenter.aspx</link><pubDate>Mon, 02 Jul 2012 22:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10326305</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10326305</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/07/02/omi-open-management-infrastructure-to-bring-the-power-of-powershell-and-standards-to-devices-in-your-datacenter.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;"&gt;PowerShell community,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;We are pleased to announce availability of OMI - a highly portable, small footprint, high performance CIM Object Manager. OMI stands for Open Management Infrastructure, and it is available from Open Group as an open source project. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;See this Windows Server blog post for full details. &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/06/28/open-management-infrastructure.aspx"&gt;http://blogs.technet.com/b/windowsserver/archive/2012/06/28/open-management-infrastructure.aspx&lt;/a&gt;&lt;/span&gt;&lt;u5:p&gt;&lt;/u5:p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;OMI opens up management of hardware devices in a datacenter using&amp;nbsp;what we call a &amp;nbsp;"Datacenter Abstraction Layer" or DAL. Imagine configuring a set of &amp;nbsp;hardware devices from different vendors&amp;nbsp;(like&amp;nbsp; network switches)&amp;nbsp;using a set of PowerShell cmdlets - that's what DAL&amp;nbsp;would bring to you. Basically, a&lt;span style="font-size: small;"&gt;&lt;span&gt;&lt;span&gt;ny&lt;/span&gt; device or server &amp;nbsp;that implements standard protocol and &amp;nbsp;schema can be managed from standard compliant tools like &lt;span&gt;PowerShell&lt;/span&gt;. A big blocker for IHVs to adopt was availability of a portable and high performance&amp;nbsp;CIM+WsMan server that they can easily port to their devices. This gap has been filled by OMI. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;This is cool&amp;nbsp; and we are so excited about it. Jeffrey Snover did a technology demonstration at TechEd Europe in which he used PowerShell to manage a &lt;/span&gt;&lt;span style="font-size: small;"&gt;base-motherboard controller on a server, a Windows operating system, and an Arista switch running OMI. You can see recording of this session &lt;span style="color: #0000ff;"&gt;&lt;a href="http://channel9.msdn.com/Events/TechEd/Europe/2012/FDN04" target="_blank"&gt;&lt;span style="color: #0000ff;"&gt;here&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt; (look at 51:15 mark)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;Osama Sajid , Program Manager&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;Standards Based Management Team&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10326305" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Open+Management+Infrastructure/">Open Management Infrastructure</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/OMI/">OMI</category></item><item><title>Snippets in Windows PowerShell ISE 3.0</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/27/snippets-in-windows-powershell-ise-3-0.aspx</link><pubDate>Wed, 27 Jun 2012 15:40:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10324561</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10324561</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/27/snippets-in-windows-powershell-ise-3-0.aspx#comments</comments><description>&lt;p&gt;&lt;em&gt;&lt;font color="#a5a5a5"&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sub&gt;&lt;/sub&gt;&lt;sub&gt;&lt;/sub&gt;This blog post applies to the Windows PowerShell Integrated Scripting Environment (ISE) in Windows 8 and Windows Server 2012.&amp;#160; The ISE is also fully supported and available when Server 2012 is deployed using the &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/03/20/building-an-optimized-private-cloud-using-windows-server-8-server-core.aspx"&gt;Minimal Server Interface&lt;/a&gt;.&amp;#160; To start ISE, type &lt;font style="background-color: rgb(255, 255, 255);"&gt;&lt;font face="Lucida Console"&gt;&lt;strong&gt;ise&lt;/strong&gt;&lt;/font&gt;&amp;#160; &lt;/font&gt;in a PowerShell console and press &lt;font face="Lucida Console"&gt;&lt;strong&gt;Enter&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Snippets provide a convenient way to paste arbitrary text into the ISE console and script editor, right where you need it.&amp;#160; The idea is to provide improved productivity, discoverability, and usability:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;To save you from typing repetitive or long text (or hunting for the script to copy-and-paste from)&lt;/li&gt; &lt;li&gt;To save you a trip to Get-Help (think about all the attributes on script cmdlets)&lt;/li&gt; &lt;li&gt;Beginners may insert an if statement as a means of learning PowerShell syntax&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;For those of you who are familiar with Visual Studio’s Snippets, the ISE version uses the same shortcut key, but it will surely feel like a “poor man’s version” :-), lacking the ability to tab between fields, among other things.&lt;/p&gt; &lt;p&gt;You can list available Snippets by pressing &lt;font face="Lucida Console"&gt;&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;/font&gt;+&lt;strong&gt;&lt;font face="Lucida Console"&gt;J&lt;/font&gt;&lt;/strong&gt; or selecting “Start Snippets” from the “Edit” menu.&amp;#160; Notice that a tooltip displays the actual text which will be inserted, as you move over the selections in the Snippets drop-down.&amp;#160; Here’s what it looks like: &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2727.image_5F00_083C0C0E.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6835.image_5F00_thumb_5F00_72E37807.png" width="425" height="234" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;There are 3 types of snippets:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Default snippets, which ship with PowerShell ISE 3.0&lt;/li&gt; &lt;li&gt;User-defined snippets&lt;/li&gt; &lt;li&gt;Module-based snippets&lt;/li&gt; &lt;/ul&gt; &lt;em&gt;&lt;/em&gt; &lt;h3&gt;Default Snippets &lt;/h3&gt; &lt;p&gt;Consider these to be the “starter set” of snippets: PowerShell code that is either frequently used, or hard to discover.&amp;#160; Press &lt;font face="Lucida Console"&gt;&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;/font&gt;+&lt;strong&gt;&lt;font face="Lucida Console"&gt;J&lt;/font&gt;&lt;/strong&gt; to start Snippets and look through the various default snippets.&lt;/p&gt; &lt;p&gt;For those of who may have developed a specific coding style over the years, and feel very strongly about whether the curly braces belong on the same line or on the next line :-), you’ll be pleased to know that you can hide the default snippets, either through the Options dialog (at the bottom of the “General Settings” tab), or directly through the ISE object model at the command line:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1207.image_5F00_7137CD95.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2604.image_5F00_thumb_5F00_27A87F98.png" width="321" height="17" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;User-Defined Snippets &lt;/h3&gt; &lt;p&gt;You can create your own snippets and add them to the snippets drop-down list using the &lt;font face="Lucida Console"&gt;New-IseSnippet&lt;/font&gt; cmdlet.&amp;#160; Here’s the cmdlet syntax, using one of my favorite new features: Show-Command:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8535.image_5F00_6B7F44A0.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4035.image_5F00_thumb_5F00_63F665E4.png" width="214" height="240" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;em&gt;Note that you can also type New-IseSnippet anywhere in the ISE, and then press &lt;font face="Lucida Console"&gt;Ctrl+F1&lt;/font&gt; when the caret (you may be calling it “cursor”) is anywhere within the cmdlet string.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Here’s an example: I often find myself wanting to show the definition (body) of a function.&amp;#160; for that, I would have to type &lt;font face="Lucida Console"&gt;Get-Command&lt;/font&gt;, followed by the function name, wrap the whole thing in parentheses, and then append &lt;font face="Lucida Console"&gt;.Definition&lt;/font&gt;.&amp;#160; A snippet comes in handy:&lt;/p&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;New-IseSnippet -Title &amp;quot;Show Definition&amp;quot; -Description &amp;quot;Shows command definition&amp;quot; -Text &amp;quot;(Get-Command ).Definition&amp;quot; -CaretOffset 13&lt;/font&gt;&lt;/p&gt; &lt;p&gt;This example adds a “Show Definition” snippet to the snippets list, and inserts the following text when selected:&amp;#160;&amp;#160; &lt;font face="Lucida Console"&gt;(Get-Command ).Definition&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Notes: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;The caret is placed 13 characters after the start of the snippet text (ready for you to enter the command name).&amp;#160; This is what the –CaretOffset parameter is for&lt;/li&gt; &lt;li&gt;Example usage: &lt;font face="Lucida Console"&gt;(Get-Command prompt).Definition &lt;/font&gt;&lt;/li&gt; &lt;li&gt;To see all user-defined snippets, type: &lt;font face="Lucida Console"&gt;Get-IseSnippet&lt;/font&gt;&lt;/li&gt; &lt;li&gt;To remove a snippet, go to the folder which contains all user-defined snippets (available from &lt;font face="Lucida Console"&gt;Get-IseSnippet&lt;/font&gt;) and delete the corresponding snippet file.&amp;#160; &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;If you prefer to hand-craft your snippets instead of using the cmdlet, just create an XML file like the one below, and copy it to the snippets “home” folder, which you can get using one of the following methods: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font face="Lucida Console"&gt;Join-Path (Split-Path $profile.CurrentUserCurrentHost) &amp;quot;Snippets&amp;quot;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;Type &lt;font face="Lucida Console"&gt;Get-IseSnippet&lt;/font&gt; and copy the displayed path &amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Any snippets in the snippets home folder will be loaded automatically by the ISE when it starts.&amp;#160; If you don’t want to place your snippets in the home folder, you can place them anywhere (C:\temp for example), but then you must load them explicitly in your ISE profile using: &lt;font face="Lucida Console"&gt;Import-IseSnippet -Path 'C:\Temp'&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Snippets files have an extension of .snippets.ps1xml and have the following structure: &lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt; &lt;p&gt;&amp;lt;?xml version='1.0' encoding='utf-8' ?&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Snippets&amp;#160; xmlns='&lt;a href="http://schemas.microsoft.com/PowerShell/Snippets'"&gt;http://schemas.microsoft.com/PowerShell/Snippets'&lt;/a&gt;&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Snippet Version='1.0.0'&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Header&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Title&amp;gt;Show Definition&amp;lt;/Title&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Description&amp;gt;Shows command definition&amp;lt;/Description&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Author&amp;gt;&amp;lt;/Author&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt; SnippetTypes&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt; SnippetType&amp;gt;Expansion&amp;lt;/SnippetType&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/SnippetTypes&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Header&amp;gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Code&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Script Language='PowerShell' CaretOffset='13'&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;![CDATA[(Get-Command ).Definition]]&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Script&amp;gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Code&amp;gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Snippet&amp;gt; &lt;br /&gt;&amp;lt; /Snippets&amp;gt;&lt;/p&gt; &lt;/font&gt;&lt;/blockquote&gt; &lt;p&gt;Where: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Title: The name which appears in the snippets drop-down list&lt;/li&gt; &lt;li&gt;Description: The description which appears in the snippet tooltip&lt;/li&gt; &lt;li&gt;Cdata: The tag which contains the actual snippet text&lt;/li&gt; &lt;/ul&gt; &lt;h3&gt;Module-Based Snippets&lt;/h3&gt; &lt;p&gt;To load all module-based snippets (which only works for modules which have already been imported using &lt;font face="Lucida Console"&gt;Import-Module&lt;/font&gt;), use: &lt;font face="Lucida Console"&gt;Import-IseSnippet -Module Xyz&lt;/font&gt;&lt;/p&gt; &lt;p&gt;If you’re shipping a module with snippets, place your snippet files into a “Snippets” folder, directly under the module folder.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;I hope that this quick walk-through will encourage you to use snippets, create your own, and share them with the community.&amp;#160; &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;ref@ &lt;/p&gt; &lt;p&gt;Refaat Issa&lt;/p&gt; &lt;p&gt;Program Manager, Windows Server Manageability&lt;/p&gt; &lt;p&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10324561" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+ISE/">PowerShell ISE</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>Basic installation guide for Windows PowerShell Web Access</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/27/windows-powershell-web-access-basic-installation-guide.aspx</link><pubDate>Tue, 26 Jun 2012 23:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10324286</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10324286</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/27/windows-powershell-web-access-basic-installation-guide.aspx#comments</comments><description>&lt;p&gt;&lt;a title="Windows PowerShell Web Access" href="http://blogs.msdn.com/b/powershell/archive/2012/03/07/introducing-windows-powershell-web-access-in-windows-server-8-beta.aspx"&gt;Windows PowerShell Web Access&lt;/a&gt; is a new feature in Windows Server 2012. It is an IIS application that provides a Windows PowerShell console in a web browser. The IIS application acts as a gateway between the web browser and the machines that you can connect to in your environment. These machines should have Windows PowerShell remoting enabled.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The video&amp;nbsp;below illustrates the three simple steps of setup and configuration &amp;ndash;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;1.&amp;nbsp;Feature installation&lt;/strong&gt;&lt;br /&gt;In the video we use GUI to install the feature. We could also use the Windows PowerShell cmdlet equivalent for installation (run the cmd in an elevated PowerShell console) &amp;ndash; &lt;br /&gt;&lt;span style="font-family: courier new,courier;"&gt;Install-WindowsFeature &amp;ndash;Name WindowsPowerShellWebAccess &amp;ndash;IncludeAllManagementTools&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.&amp;nbsp;Web application setup in IIS&lt;/strong&gt;&lt;br /&gt;After successful feature installation, IIS has to be configured to host the web application. The video illustrates automated setup for IIS using the cmdlet &lt;span style="font-family: courier new,courier;"&gt;Install-PswaWebApplication &lt;span style="font-family: arial,helvetica,sans-serif;"&gt;where&lt;/span&gt;&lt;/span&gt;&amp;nbsp;default values are used by the cmdlet to setup the web application and the website.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/7140.IIS-setup-with-PSWA.png"&gt;&lt;img style="margin-right: auto; margin-left: auto; display: block;" border="0" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/7140.IIS-setup-with-PSWA.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t wish to use the default values, you can specify values for &lt;span style="font-family: courier new,courier;"&gt;&amp;ndash;WebApplicationName&lt;/span&gt; and &lt;span style="font-family: courier new,courier;"&gt;&amp;ndash;WebsiteName&lt;/span&gt; parameters for the cmdlet. You can also configure IIS manually. More details on different ways to configure IIS are available in &lt;a title="Windows PowerShell Web Access help document" href="http://technet.microsoft.com/en-us/library/hh831611#BKMK_config"&gt;Windows PowerShell Web Access help document&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.&amp;nbsp;Configuring authorization rules&lt;/strong&gt; &lt;br /&gt;The authorization rules act as a white list and help manage access control to the gateway and the remote machine. Without the authorization rules, no user will be able to use PSWA&amp;rsquo;s website to login and manage a remote machine.&lt;/p&gt;
&lt;p&gt;In the video, we create one authorization rule for the administrator to login to the pswagateway machine. As specified by the rule, the administrator will only be able to connect to the default PowerShell endpoint, i.e. Microsoft.PowerShell on the machine pswagateway. The login will fail if the administrator tries to connect to some other machine or some other PowerShell endpoint on pswagateway.&lt;/p&gt;
&lt;p&gt;There may be other local or built-in users on pswagateway machine who have access rights to manage the machine using other remote connection software such as Remote Desktop services etc. But, they cannot connect to pswagateway via &lt;a title="PowerShell Web Access " href="http://blogs.msdn.com/b/powershell/archive/2012/03/07/introducing-windows-powershell-web-access-in-windows-server-8-beta.aspx"&gt;PowerShell Web Access&lt;/a&gt; because no authorization rule is created for them. Therefore, authorization rules provide an additional layer of security on top of the existing access control rights on the machine.&lt;/p&gt;
&lt;p&gt;More details on authorization rules can be found in &lt;a title="Windows PowerShell Web Access help document" href="http://technet.microsoft.com/en-us/library/hh831611.aspx#BKMK_auth"&gt;Windows PowerShell Web Access help document&lt;/a&gt;. Also, stay tuned for a blog post on authorization rules.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In all, &lt;a title="Windows PowerShell Web Access " href="http://blogs.msdn.com/b/powershell/archive/2012/03/07/introducing-windows-powershell-web-access-in-windows-server-8-beta.aspx"&gt;Windows PowerShell Web Access&lt;/a&gt; provides a secure way to access a remote PowerShell console in a web browser. This provides mobility and ease of access. Since the web console is accessible via a website, users can now connect to their remote machines from various mobile devices such as tablets, phones etc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kriti Jindal&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Program Manager&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Windows PowerShell Web Access&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Microsoft Corporation&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Click &lt;a title="here" href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/5023.Video01_2D00_basic_2D00_pswa_2D00_install.wmv"&gt;here&lt;/a&gt; to download the video.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p align="center" id="video_10324286"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/5023.Video01_2D00_basic_2D00_pswa_2D00_install.wmv"&gt;&lt;img src="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/7875.server_2D00_manager.png" border = "0" width="700" height="625"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href = "http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/5023.Video01_2D00_basic_2D00_pswa_2D00_install.wmv"&gt;View Video&lt;/a&gt;&lt;br /&gt;Format: wmv&lt;br /&gt;Duration: 06:29&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10324286" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/5023.Video01_2D00_basic_2D00_pswa_2D00_install.wmv" length="0" type="video/x-ms-wmv" /><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Web+Access/">PowerShell Web Access</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>Improving the FileSystem Provider through Community feedback</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/21/improving-the-filesystem-provider-through-community-feedback.aspx</link><pubDate>Thu, 21 Jun 2012 21:53:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10322746</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10322746</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/21/improving-the-filesystem-provider-through-community-feedback.aspx#comments</comments><description>&lt;p&gt;One of the things we love about the Windows PowerShell community is that folks are not shy. It turns out that having a vocal community is a great way to build and evangelize a product like ours. Of course, the Unix guys had this all figured out a long time ago.&lt;/p&gt;
&lt;p&gt;Positive comments are good and all, but it&amp;rsquo;s difficult to really improve without being told where we came short. One of the ways we take feedback from the community for Windows PowerShell is through our public &lt;a href="http://connect.microsoft.com/powershell"&gt;Microsoft Connect&lt;/a&gt; site. On that site anyone with a Live ID can log a bug or suggestion against Windows PowerShell. Items then get voted up or down by the community according to popularity.&lt;/p&gt;
&lt;p&gt;We don&amp;rsquo;t get to implement every suggestion and fix every bug, but it&amp;rsquo;s a great way for us to understand what people are looking for and how important it is to them. With Windows PowerShell 3.0 we fixed over 200 items that were filed on Connect. This post will quickly touch on a few improvements to the FileSystem Provider based on this community feedback.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Support for Credentials&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;PowerShell MVP Joel Bennett filed &lt;a href="https://connect.microsoft.com/PowerShell/feedback/details/334084/filesystem-provider-should-support-credentials"&gt;a suggestion&lt;/a&gt; a few years ago asking that we support credentials with the FileSystem Provider. That suggestion was recently our 4&lt;sup&gt;th&lt;/sup&gt; most voted item with 82 votes. The scenario is quite basic: You want to access a network file share, and that share requires a different set of credentials than the ones you are currently logged on with.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m happy to say that support for credentials on the FileSystem provider is available in Windows PowerShell 3.0! To use alternate credentials, simply use the Credential parameter on the New-PSDrive cmdlet&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: terminal,monaco;"&gt;PS &amp;gt; New-PSDrive -Name J -PSProvider FileSystem -Root \\server001\sharename -Credential mydomain\travisj&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: terminal,monaco;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used (GB)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Free (GB) Provider&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: terminal,monaco;"&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --------- --------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: terminal,monaco;"&gt;J&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FileSystem&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="file://\\server001\sharename"&gt;\\server001\sharename&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can use all of the regular provider cmdlets like Get-ChildItem, Set-Location and Copy-Item against this new PSDrive just as you would normally &amp;ndash; no need to specify the credentials over and over.&lt;/p&gt;
&lt;p&gt;It gets better! By specifying the Persist switch parameter to the New-PSDrive cmdlet, the PSDrive will stay mounted across sessions. That line would look like:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: terminal,monaco;"&gt;PS &amp;gt; New-PSDrive -Name J -PSProvider FileSystem -Root \\server001\sharename -Credential mydomain\travisj -Persist&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Moving items across drives&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;While we&amp;rsquo;re on the subject of the provider cmdlets, I want to mention that &lt;a href="https://connect.microsoft.com/PowerShell/feedback/details/161675/move-item-cmdlet-cant-move-items-between-different-psdrives"&gt;Move-Item can now move items across PSDrives&lt;/a&gt;. Using the PSDrive created above, we can move items from the network share (that was even mounted using a different set of credentials) to a location on the local file system. This one-liner will copy all XML files from the network share to a temporary directory on my computer.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: terminal,monaco;"&gt;Move-Item -Path J:\*.xml -Destination C:\temp&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;LiteralPath Parameter&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Finally, we know that users have &lt;a href="https://connect.microsoft.com/PowerShell/feedback/details/211307/-item-cmdlets-ignore-items-containing"&gt;experienced difficulty&lt;/a&gt; working with files that contain characters like &amp;lsquo;[&amp;lsquo; or &amp;lsquo;]&amp;rsquo;. To help with this in Windows PowerShell 2.0, we added the LiteralPath parameter to some of the provider cmdlets. With Windows PowerShell 3.0, we have now added&lt;br /&gt;LiteralPath to the Rename-Item cmdlet (the last of the provider cmdlets) and in many other places. LiteralPath is now available on 49 different cmdlets in Windows PowerShell 3.0!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now that you&amp;rsquo;ve read this post, head on over to our &lt;a href="http://connect.microsoft.com/powershell"&gt;Connect&lt;/a&gt; site and file a suggestion or bug for us. Or vote someone else&amp;rsquo;s up.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Travis Jones [MSFT]&lt;br /&gt;Program Manager - Windows PowerShell&lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10322746" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/MVP/">MVP</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>
Running show-command to discover cmdlets </title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/21/running-show-command-to-discover-cmdlets.aspx</link><pubDate>Thu, 21 Jun 2012 02:49:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10322439</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10322439</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/21/running-show-command-to-discover-cmdlets.aspx#comments</comments><description>&lt;h1&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;&lt;em&gt;&lt;span style="color: #a5a5a5;" color="#a5a5a5"&gt;This blog post applies to the Windows PowerShell&amp;nbsp;Version 3.0.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;&lt;em&gt;&lt;span style="color: #a5a5a5;" color="#a5a5a5"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h2&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;Problem: How can I find out what cmdlets are available for a given task?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;Finding cmdlets in the traditional way&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;If you know the basics of get-command, feel free to skip this section.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;If you are searching for a cmdlet to add a printer, you could star with something like:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;PS C:\Users\mspuser&amp;gt; get-command *printer*&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;CommandType&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ModuleName&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;-----------&amp;nbsp;&amp;nbsp;&amp;nbsp; ----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----------&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add-Printer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add-PrinterDriver&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add-PrinterPort&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-Printer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-PrinterDriver&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Get-PrinterPort&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-PrinterProperty&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove-Printer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove-PrinterDriver&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove-PrinterPort&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rename-Printer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set-Printer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set-PrinterProperty&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintManagement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier; font-size: small;" size="3"&gt;Cmdlet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Out-Printer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Microsoft.PowerShell.Utility&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Notice the choice of the noun &amp;ldquo;printer&amp;rdquo;, as opposed to the verb &amp;ldquo;add&amp;rdquo;. &amp;ldquo;Add&amp;rdquo; could be adding anything, so reducing the scope to &amp;ldquo;printer&amp;rdquo; allows for a more precise initial search.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;For this simple case of adding a printer, it is very possible that the first guess would be &amp;ldquo;add-printer&amp;rdquo;, but the verb is not always as simple to guess. Also, it is nice to look around and see what other printer related cmdlets are available. Chances are one task leads to another and we will need another cmdlet soon like get-printer to see that the printer we added is there.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;The first * in *printer* allows finding cmdlets with any verb or noun prefix. By &amp;ldquo;noun prefix&amp;rdquo; I mean the cmdlet developers could have called them &lt;b&gt;System&lt;/b&gt;Printers, &lt;b&gt;PS&lt;/b&gt;Printers, or other name. The second * allows for any noun suffix like &amp;ldquo;Driver&amp;rdquo; and &amp;ldquo;Property&amp;rdquo; in the list above. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;After looking at the list, we might conclude that we are not interested in &amp;ldquo;PrinterDriver&amp;rdquo; or &amp;ldquo;PrinterPort&amp;rdquo; so that the second * made our search less precise. We can issue the command again without the second * for less results but, for the generic case of searching for any other noun, using both * will guarantee we will not miss anything.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;After you found the cmdlet, you can explorer it a bit further with one of the following: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get-help add-printer&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get-command add-printer&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size: large;" size="4"&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;&lt;span style="font-family: Cambria;" face="Cambria"&gt;Finding cmdlets with show-cmdlet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;We saw in &lt;a title="Running show-command for a cmdlet" href="http://blogs.msdn.com/b/powershell/archive/2012/04/13/running-show-command-for-a-cmdlet.aspx"&gt;Running show-command for a cmdlet&lt;/a&gt;, how to use show-command for a specific cmdlet. If you run just &amp;ldquo;show-command&amp;rdquo; this is what you get:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/5554.a.png"&gt;&lt;img width="419" height="633" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/5554.a.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;Note:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&amp;nbsp;&lt;span size="3"&gt;A &amp;ldquo;Module&amp;rdquo; is a set of cmdlets for a given domain. In this window you can see cmdlets from all modules, but you might filter the results to a specific module, in the &amp;ldquo;Modules&amp;rdquo; drop down.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;If then you type &amp;ldquo;printer&amp;rdquo; under Name, you have:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/1616.a.png"&gt;&lt;img width="421" height="673" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/1616.a.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Notice that *printer* is implicit. If the cmdlet contains printer, you will see it.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;If you had typed printers, you would see the same list, because the search results also include the singular form of what you typed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;When you click the Add-Printer cmdlet you get the window on the left below, and after you click &amp;ldquo;Show-Details&amp;rdquo; you get the window on the right:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/1667.a.png"&gt;&lt;img width="625" height="479" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74/1667.a.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;Show-command allows for a simpler way to find a cmdlet and then to get more details about it such as parameters and help (question mark button). It is a simpler route from thinking about a task to finding out how to accomplish it.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Calibri;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span size="3"&gt;Notes: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;The &amp;ldquo;Add-Printer&amp;rdquo; section of the window is the same we would see if we had typed &amp;ldquo;show-command add-printer&amp;rdquo; and that part is explored a bit more in &lt;a title="Running show-command for a cmdlet" href="http://blogs.msdn.com/b/powershell/archive/2012/04/13/running-show-command-for-a-cmdlet.aspx"&gt;Running show-command for a cmdlet&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;The same window as the one displayed for &amp;ldquo;show-command&amp;rdquo; is also embedded in &amp;ldquo;PowerShell ISE&amp;rdquo; by default and can be seen in the &amp;ldquo;View - Show Command Add-on&amp;rdquo; menu when not present. To start ISE, type &lt;span style="color: #808080;"&gt;ise&lt;/span&gt;&amp;nbsp;in a PowerShell console and press Enter.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: medium;" face="Calibri"&gt;&lt;span size="3"&gt;If the cmdlet module is already imported, you will not see the &amp;ldquo;Show Details&amp;rdquo; button. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;For a cmdlet belonging to a module that was not yet imported, we had 2 alternatives: starting to load the module as soon as Add-Printer is selected, or using the intermediary &amp;ldquo;Show Details&amp;rdquo; text you see on the left. We decided for the intermediate step to give the user a chance to understand a module is going to be imported and explicitly choose to do that. We were not comfortable with the idea of selecting list items with mouse or keyboard resulting in modules being loaded implicitly.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Lucio Silveira [MSFT]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10322439" width="1" height="1"&gt;</description></item><item><title>High Level Architecture of Windows PowerShell Workflow (Part 2)</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/19/high-level-architecture-of-windows-powershell-workflow-part-2.aspx</link><pubDate>Tue, 19 Jun 2012 22:09:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10321960</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10321960</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/19/high-level-architecture-of-windows-powershell-workflow-part-2.aspx#comments</comments><description>&lt;p align="justify"&gt;&lt;font size="3"&gt;This is the second part of our post on the high level architecture of Windows PowerShell Workflow. &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/06/15/high-level-architecture-of-windows-powershell-workflow-part-1.aspx"&gt;&lt;font size="3"&gt;Part 1 of this blog post&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; provided an overview of the architecture and its various components. This post will go into more detail on the various subcomponents and provide some insight into the internals of Windows PowerShell Workflow. The component diagram for the PowerShell Workflow Executive is repeated (from part 1) for reference&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2671.image_5F00_0EE8E64F.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0537.image_5F00_thumb_5F00_0116A054.png" width="712" height="373" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;Each of the components in the diagram is discussed in detail below.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;1. Workflow Compilation, Caching and Validation&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;a href="http://msdn.microsoft.com/en-us/netframework/aa663328.aspx"&gt;&lt;font size="3"&gt;Windows Workflow Foundation&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; deals with and understands Activity objects. An executable workflow is simply a collection of activity objects. Each step in the workflow corresponds to an activity in the collection. The activity objects in a workflow can be programmatically constructed or constructed from their eXtensible Application Markup Language (XAML) definition. In Windows PowerShell workflow, we use the XAML definition of an activity. .&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;1.1 Compilation and Caching&lt;font size="3"&gt;&lt;/font&gt;&lt;/h2&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;The interaction begins when a user imports a XAML file into a Windows PowerShell session -- either a console session or the PowerShell Workflow Configuration. XAML files are treated like modules in PowerShell, so they are imported by using the &lt;font size="4" face="Courier New"&gt;Import-Module&lt;/font&gt; cmdlet. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;Here is what happens when a XAML file is imported:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;1. The XAML file contents (and any dependencies) are read and compiled into an executable workflow using the &lt;font size="4" face="Courier New"&gt;ActivityXamlServices&lt;/font&gt; class.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;2. The Activity object, the XAML definition, and any dependency information are stored in a process-wide cache. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;i&gt;&lt;font size="3"&gt;We do this because compiling a XAML definition into an executable workflow is a lengthy operation that we don't want to repeat. &lt;/font&gt;&lt;/i&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. The parameters of the workflow are extracted and a PowerShell function is synthesized that has the same name as the XAML file that contained the workflow definition. The function has the same parameters as the workflow and all common workflow parameters that PowerShell provides. This synthesized function references the workflow that was compiled in step #1 and stored in the process-wide cache. &lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;i&gt;&lt;font size="3"&gt;When the user executes the workflow, this PowerShell function is actually executed.&lt;/font&gt;&lt;/i&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;4. When multiple clients connect to the workflow session configuration, all of these connections will be directed to the same process (&lt;i&gt;all of the information about session configurations warrants a blog post in itself&lt;/i&gt;). In this case each of the sessions will contain a synthesized function but all of these functions will refer to the same entry in the cache.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7484.image_5F00_2131AD11.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8055.image_5F00_thumb_5F00_6F3A0C86.png" width="705" height="115" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;After a XAML file is imported, you can use &lt;font size="4" face="Courier New"&gt;Get-Command&lt;/font&gt; to look at the corresponding command. Note that its command type is &amp;quot;workflow,&amp;quot; even though the underlying implementation is a function. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h3&gt;&lt;font size="3"&gt;1.1.1 PowerShell Script to Workflow Conversion&lt;/font&gt;&lt;/h3&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;When you author a workflow in PowerShell (using the &lt;font size="4" face="Courier New"&gt;workflow&lt;/font&gt; keyword, as detailed in Part 1), the PowerShell parser converts it into an intermediate representation referred to in developer terms as an Abstract Syntax Tree (AST). The AST is then converted to a XAML document in memory. This XAML document goes through the same compilation and caching steps detailed above. It is possible to examine this XAML definition by using the &lt;font size="4" face="Courier New"&gt;Get-Command&lt;/font&gt; cmdlet. For example, consider the following workflow:&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7450.image_5F00_6167C68B.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1682.image_5F00_thumb_5F00_2F702601.png" width="378" height="113" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2262.image_5F00_3A99B04B.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0118.image_5F00_thumb_5F00_6FA63F7B.png" width="715" height="105" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3"&gt;The converted XAML is available in the XamlDefinition property of each workflow.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4426.image_5F00_61D3F980.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1205.image_5F00_thumb_5F00_42251FB8.png" width="715" height="342" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Note that the &lt;font size="4" face="Courier New"&gt;Get-WMIObject&lt;/font&gt; cmdlet is converted into the &lt;font size="4" face="Courier New"&gt;GetWmiObject&lt;/font&gt; activity. There is also some additional transformation – like &lt;font size="4" face="Courier New"&gt;'3:5:Get-BiosUsingScript'&lt;/font&gt; – which is used to preserve the position information in the script. This is used when writing error messages that actually reference the position of a statement in the PowerShell script, rather than the converted XAML document.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;In XAML and PowerShell workflows, the synthesized function is available in the &lt;font size="4" face="Courier New"&gt;ScriptBlock&lt;/font&gt; property of the workflow.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7462.image_5F00_174CBBA6.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8032.image_5F00_thumb_5F00_097A75AB.png" width="720" height="40" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;1.2 Validation&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Validation is the process of verifying that all activities in the workflow are allowed. For performance reasons, the workflow is validated when it is executed, rather than at compile time. PowerShell allows you to define workflow sandboxes where you specify which activities can be part of a workflow in a given session configuration. If the workflow includes activities that are not allowed, validation fails and workflow execution will not progress.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8055.image_5F00_7BA82FAF.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7077.image_5F00_thumb_5F00_30B4BEE0.png" width="724" height="82" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;&lt;font size="4" face="Courier New"&gt;PSDefaultActivities&lt;/font&gt; indicate that all PowerShell activities are allowed in the session configuration. Here is an example of validation failure.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1614.image_5F00_37D3FB58.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5808.image_5F00_thumb_5F00_6318925F.png" width="735" height="232" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Since the “&lt;font size="4" face="Courier New"&gt;TestWorkflow&lt;/font&gt;” custom session configuration was defined as a sandbox that allows only the &lt;font size="4" face="Courier New"&gt;Get-Process&lt;/font&gt; activity, the Get-Bios workflow fails because it uses the &lt;font size="4" face="Courier New"&gt;Get-WmiObject&lt;/font&gt; activity.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;2. Workflow Jobs Infrastructure&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;As specified in &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/06/15/high-level-architecture-of-windows-powershell-workflow-part-1.aspx"&gt;&lt;font size="3"&gt;Part 1 of this blog post&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;, in PowerShell, a workflow is always executed as a PowerShell job. The job infrastructure is not unique to PowerShell workflows but is an infrastructure provided by PowerShell that different modules can plug into. The PowerShell Workflow job infrastructure consists of the following four main components:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;1. The PowerShell workflow job implementation (the &lt;font size="4" face="Courier New"&gt;PSWorkflowJob&lt;/font&gt; object).&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;2. A job manager that maintains the list of all workflow jobs and queries/filters them.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. A workflow &lt;font size="4" face="Courier New"&gt;JobSourceAdapter&lt;/font&gt;, which is the interface between the PowerShell job cmdlets and the workflow job manager.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;4. Workflow Job Throttle Manager –ensures that no more than a specified maximum number of jobs are running at any point in time&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Since workflow jobs are built on the common job infrastructure, the PowerShell job cmdlets are used to manage the workflow jobs and they interact with the workflow job source adapter.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;2.1 Creation of Workflow Jobs&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;When the user runs the workflow from the command line, the &lt;font size="4" face="Courier New"&gt;ScriptBlock&lt;/font&gt; associated with the synthesized function is executed. Here is what happens:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;1. The Activity object for the specified workflow is obtained from the process-wide cache and it is validated as specified in the validation section (1.2).&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;2. If validation succeeds, a workflow job is created for the specified workflow. When the user specifies multiple computers (by using the &lt;font size="4" face="Courier New"&gt;PSComputerName&lt;/font&gt; parameter), a child workflow job is created under the parent job for each computer that is targeted. This way, all workflow job instances created by user in a particular invocation are managed together. (&lt;i&gt;Here is where the caching comes in handy. Since the same definition is used, a lot of time is saved by compiling only once. Caching of compiled workflows is one of the first performance improvements we made&lt;/i&gt;). &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. The workflow job is submitted to the job throttle manager which invokes the job when it is permitted to do so under the current throttling policies.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;4. If the user invoked the workflow by using the &lt;font size="4" face="Courier New"&gt;AsJob&lt;/font&gt; parameter, the parent job object is written to the pipeline. If the user did not specify the &lt;font size="4" face="Courier New"&gt;AsJob&lt;/font&gt; parameter, the synthesized function mimics synchronous behavior for the workflow.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;3. Activities&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Each workflow job instantiates a &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.activities.workflowapplication.aspx"&gt;&lt;font size="4" face="Courier New"&gt;WorkflowApplication&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; using its compiled workflow definition it retrieved from the process-wide cache. As mentioned in &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/06/15/high-level-architecture-of-windows-powershell-workflow-part-1.aspx"&gt;&lt;font size="3"&gt;Part 1&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;, &lt;font size="4" face="Courier New"&gt;WorkflowApplication&lt;/font&gt; provides a host for a single workflow instance. Since a workflow is a series of activities, the workflow engine is responsible for coordinating the execution of these activities. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;PowerShell workflows can contain different kinds of activities. These can be broadly divided into three categories:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;1. Activities supplied by Windows Workflow Foundation such as the flow control activities (while loops, if statements, etc)&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;2. Activities that represent PowerShell commands. This includes all the built-in activities supplied by PowerShell.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. Special activities – like &lt;font size="4" face="Courier New"&gt;Pipeline, PowerShellValue, GetPSWorkflowData&lt;/font&gt; and &lt;font size="4" face="Courier New"&gt;SetPSWorkflowData&lt;/font&gt;. These are primarily “helper” activities and they are mostly used when a workflow authored in the PowerShell language is translated into a XAML. &lt;i&gt;We will provide details about these activities in an upcoming blog post about workflow authoring.&lt;/i&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;&lt;font size="4" face="Courier New"&gt;PSActivity&lt;/font&gt; is the base for all PowerShell activities. Deriving from this base class, there are a number of subclasses that encapsulate differences in remoting behavior exposed by some commands. For example, some commands like the WMI and CIM cmdlets are capable of handling remoting on their own. The activities wrapping these cmdlets derive from a special subclass that coordinates their execution. Other activities such as &lt;font size="4" face="Courier New"&gt;Write-Output&lt;/font&gt; are never executed remotely. The majority of activities, however, should be executed remotely but are not themselves capable of remote execution. These activities derive from &lt;font size="4" face="Courier New"&gt;PSRemotingActivity&lt;/font&gt;. Any activity derived from &lt;font size="4" face="Courier New"&gt;PSRemotingActivity&lt;/font&gt; gets default remoting support using PowerShell remoting. Since Workflows are meant for multi-machine management, it is important that an activity is able to perform a task on a remote computer. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;We wanted to make it really easy for developers to develop activities. Developers just concentrate on developing cmdlets for use in PowerShell. A set of APIs can then be used to generate activities from these cmdlets. These activities now have remoting capabilities and can be used in workflows to target different computers. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;3.1 Determining Command Execution Type&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;As mentioned in Part 1, the command associated with an activity can be run in one of the following ways:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;1. In process – command runs within the hosting process&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;2. Out-of-process - command is run in a separate PowerShell process&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;3. Remotely - command is run on a remote machine&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;How the command is run is determined as follows:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;1. All CIM and WMI activities always run in-process (&lt;i&gt;these are first-class citizens and have special handling within PowerShell)&lt;/i&gt; to provide maximal performance and scalability.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;2. If the session configuration allows the activity to be run in-process, the command is executed within the host process&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. If the session configuration specifies that the activity needs to run out of process, the Activity Controller runs it in a separate process &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;4. If &lt;font size="4" face="Courier New"&gt;PSComputerName&lt;/font&gt; parameter is used, the command is executed remotely against the specified computer.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;3.2 Activity Execution&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;1. WMI and CIM activities are special in that they always run in-process and PowerShell directly talks to the underlying infrastructure to execute these commands – either locally or remotely.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;2. For every other activity, there is one commonality – each command (pertaining to an activity) in a workflow is executed in its own runspace. This is true for all the types specified in #2 to #4 above. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. When a command runs in-process, a runspace is obtained from a local cache of runspaces, the command is executed; the runspace is cleaned up and returned to the cache (&lt;i&gt;Maintaining a cache of runspaces is a performance-enhancing feature of Windows PowerShell Workflows&lt;/i&gt;).&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;4. When a command is run on a remote machine, a runspace is obtained from the Connection Manager, the command is executed, and the runspace is returned to the Connection Manager.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;5. When a command needs to be run out-of-process, the command is submitted to the Activity Controller. The Activity Controller maintains a pool of PowerShell worker processes in which it runs the command and calls back when it is done.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;If an activity takes a long time to run, the workflow may be passivated i.e. unloaded from memory, and all the information associated with the workflow is saved. After the activity completes, it reactivates the workflow i.e. loads the workflow’s state back into memory, and resumes execution.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;4. Connection Manager&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;As mentioned in part 1, the Connection Manager is responsible for pooling, throttling and managing all connections from workflows within the process. The Connection Manager maintains a pool of connections indexed first by the computer name and then by the session configuration name. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;4.1 Servicing a Connection Request&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;1. When an activity requests a connection to a specified computer, the Connection Manager checks to see if there is an available connection that matches all the required remoting parameters (computer name, authentication, credentials, etc). If it finds one, it marks the connection as busy, and returns the existing connection. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;2. If there is no match, it checks to see if the maximum allowed connections to a particular computer have been reached. If there is room for creation, it creates a new connection with the specified parameters. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;3. If there are open connections, but they do not match the required remoting parameters, and the maximum allowed connections to a computer has been reached, the Connection Manager finds an open connection that is free, closes that connection, and then creates a new one with the required parameters. This ensures that no more than the maximum number of remote connections is created to a particular computer.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;4. When there are no available existing connections, and a new connection cannot be created, the request is queued until a connection is freed up.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;i&gt;&lt;font size="3"&gt; To maintain a fair servicing policy, Connection Manager ensures that queued requests are serviced before new incoming requests.&lt;/font&gt;&lt;/i&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;4.2 Closing Connections Not in Use&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;A timer in the Connection Manager periodically iterates through all the connections available and checks if a connection is busy or free. If the connection is free, it is flagged. If the connection is already flagged (which means it is free since the last check), it is closed. When a connection is open, it not only amounts to resource consumption on the local computer, but there is also an active, but unused process on the remote computer. Closing a connection ensures that a process does not stay open on the remote computer unless it is necessary.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;4.3 Disconnect/Reconnect Operations&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;When the number of outbound connections increases, the Connection Manager starts to disconnect the connections. It then connects to the remote computers few at a time to obtain the data. This ensures that PowerShell Workflows can connect to a large set of machines and start commands and then obtain data in a controlled manner. There is also a limit to the total number of disconnected sessions that the Connection Manager will maintain.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3755.image_5F00_6A37CED7.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4426.image_5F00_thumb_5F00_0A52DB95.png" width="718" height="99" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;i&gt;&lt;font size="3"&gt;MaxSessionPerRemoteNode is the maximum number of connections that will be made to each remote computer.&lt;/font&gt;&lt;/i&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;4.4 Throttling&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;The Connection Manager throttles all operations – &lt;font size="4" face="Courier New"&gt;open, close, connect&lt;/font&gt; and &lt;font size="4" face="Courier New"&gt;disconnect&lt;/font&gt; - using a single queue. This ensures that there are no more than a specified maximum number of network operations in progress. The throttling works similar to the throttling in PowerShell remoting.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;5. Activity Controller&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Whenever an activity is considered unreliable (&lt;i&gt;like a script that was grabbed from a blog post&lt;/i&gt;), the workflow author or the administrator might want to run the activity in a separate process. This will ensure that, in case there is a crash, the whole session is not brought down; only the activity fails. The Activity Controller maintains a pool of PowerShell processes and is responsible for executing activities out of process. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;5.1 Executing Activities Out of Process&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;The Activity Controller maintains an unbounded queue of incoming requests. The request typically contains the command to execute and its input, the output buffer, the variables that need to set and the modules that need to be made available for the command to execute.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;The activities that will be run out of process, the number of processes that the Activity Controller will create, and the amount of time a process will stay idle, are determined by the properties of the session configuration.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0624.image_5F00_2A6DE852.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1205.image_5F00_thumb_5F00_1C9BA257.png" width="726" height="79" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;A servicing thread in the Activity Controller picks requests from the queue, creates a new PowerShell process if required, creates a new runspace (out-of-process runspace) for every command execution, prepares the runspace, and finally executes the command. Once complete the Activity Controller calls back into the activity and the workflow execution resumes.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;If the process crashes during execution of the command, the activity fails and the workflow handles this failure.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;6. Persistence&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Persistence is the operation within the execution of the workflow that saves information about the workflow to a store. Windows PowerShell Workflow uses a file-based store. The persisted information consists of the workflow definition, workflow parameters, workflow job state, internal state information, input and output, metadata associated with the workflow, etc.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;Every workflow has a –&lt;font size="4" face="Courier New"&gt;PSPersist&lt;/font&gt; common parameter that has a tri-state value:&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;1. Not specified – persist at the beginning and end of a workflow&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;2. &lt;font size="4" face="Courier New"&gt;$true&lt;/font&gt; – persist after execution of every activity&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;3. &lt;font size="4" face="Courier New"&gt;$false&lt;/font&gt; – do not persist at all&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Persistence can also be managed within the workflow itself. If the workflow has a &lt;font size="4" face="Courier New"&gt;CheckPoint-Workflow&lt;/font&gt; or a &lt;font size="4" face="Courier New"&gt;Suspend&lt;/font&gt; activity specified at any point, persistence happens at those points as well.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="3"&gt;When a workflow is resumed, it always resumes from the last persisted point.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;6.1 Begin Persistence&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;All the information, including the workflow definition and the input, are persisted when the workflow job is created. This is because a workflow job may not start running as soon as it is created due to throttling. Before the start of the workflow, if the process restarts (for whatever reason), the job can simply be resumed since all the parameters and input are available. This helps when there are a large number of jobs being executed, which is typical when managing a large number of machines.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;6.2 End Persistence&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;&lt;i&gt;End persistence&lt;/i&gt; is persistence that happens when the workflow reaches a terminal state (&lt;font size="4" face="Courier New"&gt;Completed&lt;/font&gt;, &lt;font size="4" face="Courier New"&gt;Stopped&lt;/font&gt; or &lt;font size="4" face="Courier New"&gt;Failed&lt;/font&gt;). The idea is that a user will be able to retrieve output and state of the workflow after a process restart. &lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;Even if a user specifies –&lt;font size="4" face="Courier New"&gt;PSPersist&lt;/font&gt; as $&lt;font size="4" face="Courier New"&gt;false&lt;/font&gt;, we attempt to see if output from the workflow and other information can be persisted. If so, it will be persisted because it frees up memory resources. This helps Windows PowerShell Workflow scale to a large number of jobs. (&lt;i&gt;This is one of the scalability improvements. As a result, the number of jobs that can be executed simultaneously is very large).&lt;/i&gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h2&gt;6.3 Persistence at Persistence Point&lt;/h2&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;When there is a &lt;font size="4" face="Courier New"&gt;CheckPoint-Workflow&lt;/font&gt; or a &lt;font size="4" face="Courier New"&gt;Suspend&lt;/font&gt; activity in a workflow, persistence takes place at that point. This allows the workflow author to specify logical points in the execution sequence where it makes sense for the workflow to be resumed from that point.&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;h1&gt;7. Conclusion&lt;/h1&gt; &lt;font size="3"&gt;&lt;/font&gt; &lt;p align="justify"&gt;&lt;font size="3"&gt;This blog post concludes the two-part series on the high level architecture of Windows PowerShell Workflow.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&amp;#160;&lt;/p&gt; &lt;p align="left"&gt;&lt;font size="3"&gt;Narayanan Lakshmanan [MSFT]&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font size="3"&gt;Software Design Engineer – Windows PowerShell&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font size="3"&gt;Microsoft Corporation&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10321960" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Workflow/">PowerShell Workflow</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>High Level Architecture of Windows PowerShell Workflow (Part 1)</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/15/high-level-architecture-of-windows-powershell-workflow-part-1.aspx</link><pubDate>Fri, 15 Jun 2012 11:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10317574</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10317574</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/15/high-level-architecture-of-windows-powershell-workflow-part-1.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;&lt;a name="_Toc261617278"&gt;&lt;/a&gt;&lt;a name="_Toc261617277"&gt;1 Summary&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;In March we introduced &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/03/17/when-windows-powershell-met-workflow.aspx"&gt;Windows PowerShell Workflow&lt;/a&gt; (PSWF), which explained why we integrated workflows with PowerShell, and what were our major investment areas for our first release. &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/05/29/windows-server-2012-powershell-3-0-and-devops-part-2.aspx"&gt;In a recent post&lt;/a&gt;, Jeffrey Snover summarizes this decision:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;i&gt;“&lt;/i&gt;&lt;i&gt;We integrated the &lt;/i&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/03/17/when-windows-powershell-met-workflow.aspx"&gt;&lt;i&gt;Windows Workflow Foundation&lt;/i&gt;&lt;/a&gt;&lt;i&gt; engine into PowerShell to make it simple and easy to automate things that take a long time, that operate against a very large scale, or that require the coordination of multiple steps across multiple machines.&lt;/i&gt;&lt;i&gt;” &lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;While these posts talked about workflows as robust multi-machine commands, it didn’t address all the work we’ve done under the covers to make that happen. For the developers, architects, and highly-technical among you, here’s your chance to look under the hood. This is the first part of a two-blog series about the high-level architecture of the Windows PowerShell Workflow. The first one is a general description of the architecture; the second one will go into more details.&lt;/p&gt; &lt;p&gt;After these initial two blogs regarding the architecture, we will have a series of blogs that will go deeper into each area of functionality.&lt;/p&gt; &lt;h3&gt;&lt;a name="_Toc261617291"&gt;2 Goals&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The main high-level goals and requirements that influenced the Windows PowerShell Workflow architecture are:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;a. Provide a platform to minimize the complexity of managing multi-machine environments. For example, to simplify the execution of a large number of concurrent operations performed on many computers.&lt;/p&gt; &lt;p&gt;b. Provide ability for robust execution of tasks despite failed network connections, reboots, and system crashes. &lt;/p&gt; &lt;p&gt;c. Make workflows available to existing Windows PowerShell users:&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;ul&gt; &lt;li&gt;Provide support to author workflows as scripts and host them in a Windows PowerShell environment.&lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt;Provide a built in library of management tasks.&lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt;Provide workflow management through job cmdlets.&lt;/li&gt; &lt;/ul&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;d. Provide a runtime that achieves good performance and a reasonable level of scalability without imposing a lot of complexity on the user. &lt;/p&gt; &lt;p&gt;e. Support delegated administration.&lt;/p&gt; &lt;p&gt;f. Provide a “one true PowerShell workflow implementation” that everyone could take advantage of, allowing people to share workflows in the same way that they currently share scripts, etc.&lt;/p&gt; &lt;p&gt;g. Provide extensibility points that others can use to provide workflow hosting and execution functionality.&lt;/p&gt; &lt;/blockquote&gt; &lt;h3&gt;3 Architectural Overview&lt;/h3&gt; &lt;p&gt;This section covers the high-level architecture for Windows PowerShell Workflow and its components. We will start with the Windows PowerShell Workflow architecture when workflows are executed in-process in the client application. The client application can be the Windows PowerShell console host, Windows PowerShell Integrated Scripting Environment (ISE) process or other client executable, including 3&lt;sup&gt;rd&lt;/sup&gt; party host.&lt;/p&gt; &lt;p&gt;Once we finished with in-process execution, we’ll move to describing the Windows PowerShell Workflow high level architecture when workflows are executed in the dedicated Windows PowerShell Workflow Configuration. Windows PowerShell Workflow Configuration is the default Windows Remote Management (WinRM) configuration for Windows PowerShell Workflow. (Look for why we created a new configuration in a future blog). WinRM is the Microsoft implementation of the WS-Management protocol. WS-Management is a general Web services protocol based on SOAP for managing systems such as PCs, servers, devices, Web services and other applications, and other manageable entities. The WinRM Configuration is a node you connect to, identified by a ConnectionURI and ConfigurationName. Sometimes, a WinRM Configuration is called WinRM Endpoint.&lt;/p&gt; &lt;p&gt;At the end of this section, we will describe the components of the Windows PowerShell Workflow Executive.&lt;/p&gt; &lt;h4&gt;3.1 In-process execution of workflows &lt;/h4&gt; &lt;p&gt;The following diagram outlines the high-level architecture of the Windows PowerShell Workflow when the workflow is executed in-process within Powershell.exe, Powershell_ise.exe or another client application executable. In the diagram, the outer boxes represent machine boundaries, dotted red lines represent process boundaries, and the smallest boxes represent conceptual components.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1031.image_5F00_6347517D.png"&gt;&lt;img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4670.image_5F00_thumb_5F00_7523E54A.png" width="695" height="412" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;A workflow comprises a series of programming steps called &lt;i&gt;activities&lt;/i&gt;. Workflows are integrated into Windows PowerShell thorough a set of extensions to the Windows PowerShell scripting language. One of these extensions is the &lt;b&gt;workflow&lt;/b&gt; keyword. A workflow is defined by the &lt;b&gt;workflow&lt;/b&gt; keyword followed by the name and the body of the workflow. In addition, Windows PowerShell provides a built-in library of activities.&lt;/p&gt; &lt;p&gt;A &lt;i&gt;script workflow&lt;/i&gt; is a workflows written in the Windows PowerShell language.&lt;/p&gt; &lt;p&gt;Example of a script workflow in Windows PowerShell ISE:&lt;/p&gt; &lt;p&gt;#using parallel foreach &lt;br /&gt;workflow &lt;font color="#0000ff"&gt;Invoke-ParallelForEach&lt;/font&gt; &lt;br /&gt;{ &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; foreach -parallel (&lt;font color="#ff0000"&gt;$i&lt;/font&gt; in 1..10) &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; { &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;InlineScript&lt;/font&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; { &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;foo: $using:i&amp;quot; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;Get-Process&lt;/font&gt; -Name PowerShell* &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;br /&gt;} &lt;br /&gt;&lt;font color="#0000ff"&gt;Invoke-ParallelForEach&lt;/font&gt; -PSComputerName &lt;font color="#4f81bd"&gt;localhost&lt;/font&gt; -AsJob &lt;/p&gt; &lt;p&gt;Let’s see how this script is transformed into a working workflow. &lt;/p&gt; &lt;p&gt;When you run a script workflow, Windows PowerShell parses the script into an abstract syntax tree (AST). The presence of the “workflow” keyword causes the script-to-workflow compiler to use this AST to generate XAML, the format required by the Windows Workflow Foundation runtime. To create the user experience for interacting with this workflow, we then create a wrapper function that has the same parameters – but instead coordinates execution of the workflow within the PowerShell Workflow executive. You can see both the wrapper function and the generated XAML by executing: &lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;Get-Command&lt;/font&gt; &lt;font color="#8064a2"&gt;Invoke-ParallelForEach&lt;/font&gt; |&lt;font color="#0000ff"&gt;Format-List&lt;/font&gt; * &lt;/p&gt; &lt;p&gt;To create the wrapper function from the XAML workflow, Windows PowerShell uses .NET 4.0 ActivityXamlServices class to compile the XAML into an activity tree, which is the basis for all workflows in Windows Workflow Foundation 4.0. Then, it adds the activity tree to an internal cache so it can be re-used in subsequent workflow executions. (Our performance and scalability blog will explain why this is important.) &lt;/p&gt; &lt;p&gt;The activity tree is then executed by the Windows PowerShell Workflow Executive. Each workflow instance wraps a .NET 4 WorkflowApplication, which is instantiated by using the activity tree as the workflow definition.&lt;/p&gt; &lt;p&gt;If the workflow is executed in-process, such as is done in Windows PowerShell ISE, the Windows PowerShell Workflow Executive is hosted by the client application. The Executive is responsible for running the workflow and passivating and reactivating the workflow, as necessary. &lt;i&gt;Passivation&lt;/i&gt; is the process of removing the workflow state from memory and saving it in a database. &lt;i&gt;Reactivation&lt;/i&gt; is the process of loading the workflow’s state into memory and executing the workflow.&lt;/p&gt; &lt;p&gt;By default, most activities run in the same process as the Windows PowerShell Workflow Executive. If the Windows PowerShell Workflow Executive determines that an activity has the potential to be unreliable (based on its configuration), it will run the activity out of process in a pool of available Windows PowerShell Workflow Activity Host processes. The InlineScript activity is, by default, executed out of process in one of the Windows PowerShell Workflow Activity Host processes. &lt;/p&gt; &lt;p&gt;The activity can target different managed nodes and can take advantage of different remote management technologies, such as Windows PowerShell Remoting (PSRP), Common Information Model (CIM) or Windows Management Instrumentation (WMI) technologies. CIM is a remotable object model defined and published by the Distributed Management Task Force (DMTF). WMI is the Microsoft implementation of the CIM standard.&lt;/p&gt; &lt;h4&gt;3.2 Execution of workflows within Windows PowerShell Workflow Configuration&lt;/h4&gt; &lt;p&gt;The following diagram outlines the high-level architecture of the Windows PowerShell Workflow while the workflow is executed in the Windows PowerShell Workflow Configuration. The short version of why you would want to do this is that a process can invoke a workflow and then go away and the workflow continues to execute.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1145.image_5F00_18ECAF93.png"&gt;&lt;img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1638.image_5F00_thumb_5F00_11614026.png" width="731" height="301" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Example of a workflow executed in the Windows PowerShell Workflow Configuration:&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;$s&lt;/font&gt; = &lt;font color="#0000ff"&gt;New-PSWorkflowSession&lt;/font&gt; &lt;br /&gt;&lt;font color="#0000ff"&gt;Invoke-Command&lt;/font&gt; &lt;font color="#ff0000"&gt;$s&lt;/font&gt; { &lt;br /&gt;workflow &lt;font color="#9b00d3"&gt;Invoke-ParallelForEach &lt;br /&gt;&lt;/font&gt;{ &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; foreach -parallel (&lt;font color="#ff0000"&gt;$i&lt;/font&gt; in 1..10) &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; { &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;InlineScript&lt;/font&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; { &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#333333"&gt;&amp;quot;foo: $using:i&amp;quot; &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;Get-Process&lt;/font&gt; -Name PowerShell* &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;br /&gt;} &lt;br /&gt;} &lt;br /&gt;&lt;font color="#0000ff"&gt;Invoke-Command&lt;/font&gt; &lt;font color="#ff0000"&gt;$s&lt;/font&gt; { &lt;font color="#0000ff"&gt;Invoke-ParallelForEach&lt;/font&gt; -PSComputerName &lt;font color="#9b00d3"&gt;localhost&lt;/font&gt; } &lt;/p&gt; &lt;p&gt;In this case, the client connects to the Windows PowerShell Workflow Configuration using Windows PowerShell Remoting. Typically, workflows are installed on the machine that contains the Windows PowerShell Workflow Executive. &lt;/p&gt; &lt;p&gt;In the example above, the Invoke-ParallelForEach workflow is sent to the Windows PowerShell Workflow Executive by using Windows PowerShell remoting. The Windows PowerShell Workflow Executive, which is responsible for the execution of the workflow, is hosted by the WinRM provider host (wsmprovhost.exe). The WinRM service, which is the server-side implementation of the WS-Management protocol, implements a provider subsystem. &lt;/p&gt; &lt;p&gt;Each WinRM provider, including Windows PowerShell Workflow Executive, is hosted by the wsmprovhost.exe. Wsmprovhost.exe (the Windows PowerShell Workflow Executive) runs under the security context of the remote client. By default, all workflows in a given security context run under the same wsmprovhost.exe and are orchestrated by the same Windows PowerShell Workflow Executive. Different users run workflows in different wsmprovhost.exe instances. &lt;/p&gt; &lt;p&gt;If the admin creates a Windows PowerShell Workflow “RunAs” configuration, the WinRM service translates all incoming, configured user identities into one trusted security context. “RunAs” configuration is a WinRM Configuration configured for delegated administration, which runs with the permissions of a pre-defined user identity, instead of the remote user. Therefore, the workflows for all configured users for the particular “RunAs” configuration are routed to the same Windows PowerShell Workflow host and run under the same “RunAs” configured identity. &lt;/p&gt; &lt;h4&gt;3.3 Windows PowerShell Workflow components&lt;/h4&gt; &lt;p&gt;Now let’s break the Windows PowerShell Workflow Executive into its high level sub components:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1651.image14_5F00_7F187963.png"&gt;&lt;img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6332.image14_5F00_thumb_5F00_77F93CEB.png" width="717" height="423" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;All workflows are executed as jobs. This allows us to manage more operations at a time, which is critical for multi-machine management. They are also long-running – you don’t want to be sitting at your console for 2 days waiting for the task to complete. All operations related to jobs are handled by the Windows PowerShell job infrastructure component (“Job Infra” in the diagram above). The job infrastructure creates the job and returns a local proxy job that can be used to manage the workflow execution. The client can use the standard Windows PowerShell Job cmdlets to start, stop, suspend, resume, and remove the job. This will be illustrated in a separate blog.&lt;/p&gt; &lt;p&gt;The Job infrastructure interacts with “Workflow Compilation, Caching and Validation” component which is responsible for compiling the XAML into the activity tree, validating the activity tree by using the .NET 4.0 ActivityValidationServices class based on the Windows PowerShell Workflow configuration, and caching the XAML and the activity tree. More about these later.&lt;/p&gt; &lt;p&gt;For each job, “Workflow Execution Engine” component instantiates a WorkflowApplication using the activity tree as the workflow definition. WorkflowApplication is a component introduced in Windows Workflow Foundation (WF) 4.0 that provides a host for a single workflow instance. WorkflowApplication is basically a thread-safe proxy for the actual workflow instance managed by the WF runtime. For more details, see the WF 4.0 documentation.&lt;/p&gt; &lt;p&gt;Since a workflow is a series of activities, the “Workflow Execution Engine” interacts with the “Activities” component. Windows PowerShell Workflow provides a default set of PowerShell activities that any host can adopt. These activities are based on Windows PowerShell Remoting, CIM, or WMI, or are special activities, such as Pipeline, PowerShellValue, GetPSWorkflowData and SetPSWorkflowData activities. Most of these built-in activities are derived from the PSActivity base class, with the exception of the special activities specified above. When you look at the ecosystem of previous PowerShell + Workflow integrations, there’s not much of a “network effect”. If somebody makes a great PowerShell-based activity, they make their own decisions around serialization, remoting behavior, and user experience. The activities that work in one product rarely work in anyone else’s. By providing a base activity implementation and many immediately-useful PowerShell activities, we tame that inconsistency so that every new activity adds broader value.&lt;/p&gt; &lt;p&gt;These activities can run:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;- In-process with the Workflow Execution Engine. For example, CIM activities (GetCimInstanceActivity, InvokeCimMethodActivity etc) or WMI activities (GetWmiObject, InvokeWmiMethod)&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;- Out-of-Process in the ActivityHost process. For example, the InlineScript activity. Activities are executed out of process to provide isolation for reliability.&lt;/p&gt; &lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;- Remotely, if the PSComputerName parameter is specified&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;Windows PowerShell remoting activities and, to some extent, CIM activities that are executed remotely, interact with the “ConnectionManager” subcomponent. ConnectionManager is responsible for connection pooling and throttling. After all, if you’re invoking high number of workflows in parallel – the last thing you need is to be killing your own servers. The connections pool is indexed based on the machine and session configuration, and uniquely identified by the rest of remoting parameters (authentication, credentials, certificate thumbprint, proxy settings, etc.), in addition to the machine and session configuration.&lt;/p&gt; &lt;p&gt;If executed out of process, the activity interacts with the “Activity Controller” subcomponent. The Activity Controller is responsible for queuing all out-of-process activities and executing them in the pool of Activity Host processes. The out-of-process activities are specified by the configuration. &lt;/p&gt; &lt;p&gt;By default, on both Windows client and server operating system, the WorkflowApplication in the Workflow Execution Engine uses a file-based store to store the workflow definition, metadata, streams, job state. This is handled by the “Persistence” subcomponent. &lt;/p&gt; &lt;p&gt;Windows PowerShell Workflow is also a library that others can use to provide workflow hosting and execution functionality. The hosting SDK will be presented in a separate blog.&lt;/p&gt; &lt;h3&gt;4 More info&lt;/h3&gt; &lt;p&gt;While you wait for our next post, which will go deeper into the Windows PowerShell Workflow architecture, here are some additional resources about Windows PowerShell 3.0 and Windows PowerShell Workflow:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/03/17/when-windows-powershell-met-workflow.aspx"&gt;When Windows PowerShell Met Workflow&lt;/a&gt; (by Mir Rosenberg [MSFT], Senior Program Manager, Windows PowerShell)&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=27548"&gt;Getting started with Windows PowerShell Workflow&lt;/a&gt; (Download WMF3 CTP2 Windows PowerShell Workflow.pdf)&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.windowsitpro.com/blog/powershell-with-a-purpose-blog-36/windows-powershell/powershell-v3-workflow-flagship-feature-140712"&gt;PowerShell v3: Workflow is the Flagship Feature&lt;/a&gt; (by Don Jones – PowerShell MVP)&lt;/p&gt; &lt;p&gt;&lt;a href="http://halr9000.com/article/947"&gt;PowerShell Workflow, Defined&lt;/a&gt; (by Hal Rottenberg – PowerShell MVP)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/03/07/rocking-the-windows-server-8-administrative-experience.aspx"&gt;Rocking the Windows Server 8 Administrative Experience&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=246563"&gt;TechNet docs on the Workflow module&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=246399"&gt;Writing a Windows PowerShell Workflow in the Visual Studio Designer&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.powershell.workflow(v=VS.85).aspx"&gt;SDK/MSDN documentation&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Sorin Oprea [MSFT] &lt;br /&gt;Senior SDE Lead &lt;br /&gt;Windows PowerShell&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10317574" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell/">PowerShell</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Release/">PowerShell Release</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Management+Framework/">Windows Management Framework</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Workflow/">Workflow</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Workflow/">PowerShell Workflow</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Getting+Started/">Getting Started</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/XAML/">XAML</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>New V3 Language Features</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/14/new-v3-language-features.aspx</link><pubDate>Thu, 14 Jun 2012 00:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10317042</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10317042</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/14/new-v3-language-features.aspx#comments</comments><description>&lt;p&gt;We&amp;rsquo;ve already discussed the biggest new PowerShell language feature &amp;ndash; workflows &amp;ndash; in a previous post.&amp;nbsp; In this post, I&amp;rsquo;m going to describe a number of small changes we&amp;rsquo;ve made to the language.&amp;nbsp; Most of the changes described here don&amp;rsquo;t introduce any new syntax, but I think you&amp;rsquo;ll agree that most of these changes make various aspects of scripting in PowerShell simpler.&amp;nbsp; To me, many of these features are what make PowerShell a joy to use.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;span style="color: #4f81bd;" color="#4f81bd"&gt;Member Enumeration&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;To start, I&amp;rsquo;m going to describe a little feature that had no official name until I started this blog post.&amp;nbsp; I&amp;rsquo;m also starting with this feature because it was a surprise hit (to me anyway) when we demonstrated to the PowerShell MVPs recently.&lt;/p&gt;
&lt;p&gt;If you find yourself frequently piping a collection to ForEach-Object or Select-Object (or more likely the aliases % or select) to get a single property, then you&amp;rsquo;ll love this feature.&lt;/p&gt;
&lt;p&gt;Say you want a list of full paths to some files.&amp;nbsp; In PowerShell V2.0, you&amp;rsquo;d write:&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;/span&gt;dir&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;|&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;%&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; { &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$_&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;FullName }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;In PowerShell V3.0, you can write:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;(dir)&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;FullName&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It doesn&amp;rsquo;t matter if the cmdlet is returning one result or multiple results.&amp;nbsp; Under the covers, PowerShell is automatically handling the differences for you, as though you were using ForEach-Object in the first example, except it&amp;rsquo;s faster because the ForEach-Object cmdlet isn&amp;rsquo;t actually running.&lt;/p&gt;
&lt;p&gt;This new capability doesn&amp;rsquo;t introduce any new syntax and it just works wherever you would get a property or invoke a method.&amp;nbsp; But you can&amp;rsquo;t use this syntax to set properties.&lt;/p&gt;
&lt;p&gt;We added this feature to make it easier to deal with commands that return one or many objects.&amp;nbsp; Experienced PowerShell scripters knew they needed to use @() to handle that situation correctly, but we really thought that was less than perfect.&lt;/p&gt;
&lt;p&gt;Member enumeration is one piece of handling commands that return one or many objects, but there are a few other details that we&amp;rsquo;ve taken care of as well.&lt;/p&gt;
&lt;p&gt;You can now use Count or Length on any object, even if it didn&amp;rsquo;t have the property.&amp;nbsp; If the object didn&amp;rsquo;t have a Count or Length property, it will will return 1 (or 0 for $null).&amp;nbsp; Objects that have Count or Length properties will continue to work as they always have.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #ff4500;" color="#ff4500"&gt;$a&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9;" color="#a9a9a9"&gt;=&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #800080;" color="#800080"&gt;42&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #ff4500;" color="#ff4500"&gt;$a&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;Count&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="color: #ff4500;" color="#ff4500"&gt;&lt;span style="font-size: x-small;" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can also index into any object even if it didn&amp;rsquo;t have an index operation.&amp;nbsp; If the object has no indexer, index 0 simply returns the object, any other index returns nothing (or an error if strict-mode is enabled).&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #ff4500;" color="#ff4500"&gt;$a&lt;/span&gt;&lt;span style="color: #a9a9a9;" color="#a9a9a9"&gt;[&lt;span style="color: #800080;" color="#800080"&gt;0&lt;/span&gt;] &lt;br /&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="color: #ff4500;" color="#ff4500"&gt;&lt;span style="font-size: x-small;" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;42 &lt;br /&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #ff4500;" color="#ff4500"&gt;$a&lt;/span&gt;&lt;span style="color: #a9a9a9;" color="#a9a9a9"&gt;[&lt;span style="color: #800080;" color="#800080"&gt;-1&lt;/span&gt;] &lt;br /&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="color: #ff4500;" color="#ff4500"&gt;&lt;span style="font-size: x-small;" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;42&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Combining indexing and Count, you can now use for loops without worrying if the input is an array or single object:&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$x&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;dir&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #006400; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#006400" size="2"&gt;# returns 1 or more objects &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #00008b; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#00008b" size="2"&gt;for&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; (&lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$i&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;0&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;; &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$i&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;&amp;ndash;lt&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$x&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;Count; &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$i&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;++&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;) &lt;br /&gt;{ &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $x&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$i&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;... &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;These language features could actually change the behavior some scripts.&amp;nbsp; We&amp;rsquo;ve found a few real-world scripts that stopped working due to these changes.&amp;nbsp; But we also found, after closer review of these scripts, that they were already broken.&amp;nbsp; In one example the script was actually failing to process all of the data it was trying to verify.&amp;nbsp; We are not aware of any scripts where this change broke a script, but did not expose an underlying problem in the script.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;New Redirection Operators&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;There are new redirection operators so you can redirect verbose, warning, and debug streams.&amp;nbsp; Merging and file redirections work in the same way as error redirection.&amp;nbsp; Here are some examples:&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Do-Something&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;3&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;warning.txt&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #006400; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#006400" size="2"&gt;# Writes warning output to warning.txt &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Do-Something&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;4&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;verbose.txt&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #006400; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#006400" size="2"&gt;# Appends verbose.txt with the verbose output &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Do-Something&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;5&amp;gt;&amp;amp;1&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #006400; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#006400" size="2"&gt;# Writes debug output to the output stream &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Do-Something&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;*&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;out.txt&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #006400; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#006400" size="2"&gt;# Redirects all streams (output, error, warning, verbose, and debug) to out.txt&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p class="Code"&gt;We didn&amp;rsquo;t get a chance to add redirection support for host output (Write-Host, $host.UI.Write&amp;hellip;).&lt;/p&gt;
&lt;p class="Code"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Passing Local Variables to Remote Sessions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In PowerShell 2.0, if you want to use local variables when executing a script block remotely, you have to do something like:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #ff4500;" color="#ff4500"&gt;$localVar&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9;" color="#a9a9a9"&gt;=&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #800080;" color="#800080"&gt;42 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #0000ff;" color="#0000ff"&gt;Invoke-Command&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #000080;" color="#000080"&gt;-cn&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2;" color="#8a2be2"&gt;srv123&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; { &lt;/span&gt;&lt;span style="color: #00008b;" color="#00008b"&gt;param&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt;(&lt;/span&gt;&lt;span style="color: #ff4500;" color="#ff4500"&gt;$localVar&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt;) &lt;/span&gt;&lt;span style="color: #0000ff;" color="#0000ff"&gt;echo&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;span style="color: #ff4500;" color="#ff4500"&gt;$localVar&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; } &lt;/span&gt;&lt;span style="color: #000080;" color="#000080"&gt;&amp;ndash;ArgumentList&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="color: #ff4500;" color="#ff4500"&gt;&lt;span style="font-size: x-small;" size="2"&gt;$localVar &lt;br /&gt;&lt;span style="color: #000000;" color="#000000"&gt;42&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In PowerShell 3.0, variables prefixed with $using: are automatically recognized as local variables and are sent to the remote machine:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;/span&gt;&lt;span style="color: #0000ff; font-size: x-small;" color="#0000ff" size="2"&gt;Invoke-Command&lt;/span&gt;&lt;span style="color: #000000; font-size: x-small;" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #000080; font-size: x-small;" color="#000080" size="2"&gt;&amp;ndash;cn&lt;/span&gt;&lt;span style="color: #000000; font-size: x-small;" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-size: x-small;" color="#8a2be2" size="2"&gt;srv123&lt;/span&gt;&lt;span style="color: #000000; font-size: x-small;" color="#000000" size="2"&gt; { &lt;/span&gt;&lt;span style="color: #0000ff; font-size: x-small;" color="#0000ff" size="2"&gt;echo&lt;/span&gt;&lt;span style="color: #000000; font-size: x-small;" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #ff4500; font-size: x-small;" color="#ff4500" size="2"&gt;$using:localVar&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt; } &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;" color="#000000"&gt;42&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;PSItem&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We sometimes receive feedback that $_ is cryptic and confusing to people who are new to PowerShell and scripting.&amp;nbsp; Some people see $_ as a magic symbol.&amp;nbsp; To help those people, we introduced an alias for $_.&amp;nbsp; You can use $PSItem anywhere you would have used $_.&amp;nbsp; For example, instead of writing:&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;/span&gt;dir&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;|&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;%&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; { &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$_&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;FullName }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can write:&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;&lt;/span&gt;dir&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;|&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;%&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; { &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$PSItem&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;FullName }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;More Flexible Script Formatting&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We reviewed many places where newlines were previously required and relaxed those restrictions whenever it didn&amp;rsquo;t introduce any ambiguities or break existing scripts.&lt;/p&gt;
&lt;p&gt;One of the more interesting places you might find this useful is in using a fluent API.&amp;nbsp; You can now have whitespace/newlines after the &amp;lsquo;.&amp;rsquo; or &amp;lsquo;::&amp;rsquo; tokens in expression mode.&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;PowerShell&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]::&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;Create()&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;AddCommand(&lt;/span&gt;&lt;span style="color: #8b0000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8b0000" size="2"&gt;"echo"&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;)&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;AddParameter(&lt;/span&gt;&lt;span style="color: #8b0000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8b0000" size="2"&gt;"InputObject"&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;,&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;42&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;)&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;Invoke()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In PowerShell 2.0, this needs to be all on one line, or broken into multiple statements.&amp;nbsp; For example, the following probably doesn&amp;rsquo;t do what you think it should.&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Write-Output&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; (&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;int&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]::&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;MaxValue)&lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;GetType&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;() &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Write-Output&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; (&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;int&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]::&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;MaxValue)&lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;GetType&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The same expressions work when they don&amp;rsquo;t begin with a command:&lt;/p&gt;
&lt;p align="left"&gt;(&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;int&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]::&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;MaxValue)&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;.&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; GetType() &lt;br /&gt;(&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;int&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]::&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;MaxValue)&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;GetType()&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Attributes on Variables&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Validation attributes and argument transformation attributes are familiar to anyone who writes advanced functions.&amp;nbsp; In PowerShell V2.0, these attributes can be used only on parameters.&amp;nbsp; In PowerShell V3.0, you can place an attribute on any variable.&lt;/p&gt;
&lt;p class="Code"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #00bfff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#00bfff" size="2"&gt;ValidateRange&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;(&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;1&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;,&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;10&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;)&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;][&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;int&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]&lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$x&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;1&lt;/span&gt; &lt;br /&gt;PS&amp;gt; &lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$x&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;11&lt;/span&gt; &lt;br /&gt;The variable cannot be validated because the value 11 is not a valid value for the x variable. &lt;br /&gt;At line:1 char:1 &lt;br /&gt;+ $x = 11 &lt;br /&gt;+ ~~~~~~~ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MetadataError: (:) [], ValidationMetadataException &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : ValidateSetFailure&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="Code"&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Attribute Arguments Don&amp;rsquo;t Need = $true&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In PowerShell V2.0, you write:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Console'; color: darkblue; font-size: 9pt;"&gt;param&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;(&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: deepskyblue;"&gt;Parameter&lt;/span&gt;(Mandatory&lt;span style="color: darkgray;"&gt;=&lt;/span&gt;&lt;span style="color: orangered;"&gt;$true&lt;/span&gt;)&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$p&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In PowerShell V3.0, you can write:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Console'; color: darkblue; font-size: 9pt;"&gt;param&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;(&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: deepskyblue;"&gt;Parameter&lt;/span&gt;(Mandatory)&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$p&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;/p&gt;
&lt;p&gt;If you omit the argument, there is an implied argument value of $true.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Smarter Parsing of Command Names&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In PowerShell V2.0, if you are running 7z or another command that starts with a number, you have to use the command invocation operator:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;PS&amp;gt; &lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;7z &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In PowerShell V3.0, you don&amp;rsquo;t need the &amp;lsquo;&amp;amp;&amp;rsquo; anymore.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Easier Reuse of Command Lines From Cmd.exe&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The web is full of command lines written for Cmd.exe.&amp;nbsp; These commands lines work often enough in PowerShell, but when they include certain characters, e.g. a semicolon (;) a dollar sign ($), or curly braces, you have to make some changes, probably adding some quotes.&amp;nbsp; This seemed to be the source of many minor headaches.&lt;/p&gt;
&lt;p&gt;To help address this scenario, we added a new way to &amp;ldquo;escape&amp;rdquo; the parsing of command lines.&amp;nbsp; If you use a magic parameter --%, we stop our normal parsing of your command line and switch to something much simpler.&amp;nbsp; We don&amp;rsquo;t match quotes.&amp;nbsp; We don&amp;rsquo;t stop at semicolon.&amp;nbsp; We don&amp;rsquo;t expand PowerShell variables.&amp;nbsp; We do expand environment variables if you use Cmd.exe syntax (e.g. %TEMP%).&amp;nbsp; Other than that, the arguments up to the end of the line (or pipe, if you are piping) are passed as is.&amp;nbsp; Here is an example:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;&lt;span style="color: #000000;" color="#000000"&gt;PS&amp;gt; &lt;/span&gt;echoargs.exe&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;--%&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #8a2be2; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8a2be2" size="2"&gt;%USERNAME%,this=$something{weird}&lt;/span&gt; &lt;br /&gt;&lt;span style="font-family: Lucida Console; font-size: x-small;" face="Lucida Console" size="2"&gt;Arg 0 is &amp;lt;jason,this=$something{weird}&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Better Splatting of Arrays&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Sometimes you want to write a quick wrapper for a script or cmdlet, but you don&amp;rsquo;t want to write a full-on proxy cmdlet.&amp;nbsp; For example:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Console'; color: darkblue; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt; &lt;span style="color: blueviolet;"&gt;mkdir&lt;/span&gt;(&lt;span style="color: orangered;"&gt;$path&lt;/span&gt;) &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;{ &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;New-Item&lt;/span&gt; &lt;span style="color: navy;"&gt;-Path&lt;/span&gt; &lt;span style="color: orangered;"&gt;$path&lt;/span&gt; &lt;span style="color: navy;"&gt;-ItemType&lt;/span&gt; &lt;span style="color: blueviolet;"&gt;Directory&lt;/span&gt; &lt;/span&gt;&lt;span style="color: orangered;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;@args &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Now if I pass -Force or whatever to mkdir, it will be passed on correctly, but I didn&amp;rsquo;t need to specify any of the parameters to New-Item.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;New Operators&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We added a few operators:&lt;/p&gt;
&lt;table style="width: 523px;" border="1" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="138" valign="top"&gt;-shl&lt;/td&gt;
&lt;td width="383" valign="top"&gt;Shift bits left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="140" valign="top"&gt;-shr&lt;/td&gt;
&lt;td width="381" valign="top"&gt;Shift bits right &amp;ndash; preserves sign for signed values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="142" valign="top"&gt;-in&lt;/td&gt;
&lt;td width="380" valign="top"&gt;Like &amp;ndash;contains, but with the operands reversed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="143" valign="top"&gt;-notin&lt;/td&gt;
&lt;td width="379" valign="top"&gt;Like &amp;ndash;notcontains, but with the operands reversed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;-in/-notin were added to complement the &amp;ldquo;simplified foreach&amp;rdquo; feature.&amp;nbsp; We couldn&amp;rsquo;t support the &amp;ndash;contains/-notcontains operators in simplified foreach, but by reversing the operands, we could have ForEach-Object support and operator support.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;New Conversions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Sometimes you want the keys of a hash literal to be ordered.&amp;nbsp; You can now cast to [ordered] and we create an OrderedDictionary instead of HashTable.&amp;nbsp; This only works with literals &amp;ndash; if you try it on a variable, the ordering is no longer available.&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;ordered&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;@{a&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;1&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;; b&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;2&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In a similar manner, you can create custom objects with a simple cast:&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;pscustomobject&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;@{x&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;1&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;; y&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;2&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This does not create a HashTable; it creates a PSObject with note properties.&amp;nbsp; If you are casting a literal, the note properties are added in the order they appear in the literal.&amp;nbsp; If you are casting anything else, the ordering is determined by the IDictionary iterator.&lt;/p&gt;
&lt;p&gt;If a type has a default constructor and settable properties, you can also use a hash table to case an object to that type:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p align="left"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;[&lt;/span&gt;&lt;span style="color: #008080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#008080" size="2"&gt;System.Drawing.Point&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;]&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;@{X&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;1&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;; Y&lt;/span&gt;&lt;span style="color: #a9a9a9; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#a9a9a9" size="2"&gt;=&lt;/span&gt;&lt;span style="color: #800080; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#800080" size="2"&gt;2&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p align="left"&gt;This will call the default constructor and set the properties named in the hash table.&lt;/p&gt;
&lt;p&gt;In a similar manner, deserialized objects can be reconstructed if the properties are all settable.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;ForEach statement does not iterate over $null&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In PowerShell V2.0, people were often surprised by:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;&lt;span style="font-size: x-small;" size="2"&gt;PS&amp;gt; &lt;/span&gt;&lt;span style="color: #00008b; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#00008b" size="2"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; (&lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$i&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #00008b; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#00008b" size="2"&gt;in&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; &lt;/span&gt;&lt;span style="color: #ff4500; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#ff4500" size="2"&gt;$null&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;) { &lt;/span&gt;&lt;span style="color: #8b0000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8b0000" size="2"&gt;'got here'&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt; }&lt;/span&gt; &lt;br /&gt;&lt;span style="font-size: x-small;" size="2"&gt;got here&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This situation often comes up when a cmdlet doesn&amp;rsquo;t return any objects.&amp;nbsp; In PowerShell V3.0, you don&amp;rsquo;t need to add an if statement to avoid iterating over $null.&amp;nbsp; We take care of that for you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Comment Based Help Improvements&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;PowerShell V2.0 comment based help supports most of the features available in xml based help, but there were a couple of holes that we&amp;rsquo;ve addressed in V3, both related to parameter help.&amp;nbsp; If you use Get-Help &amp;ndash;full, you see a bunch of parameter descriptions that include text like the following:&lt;/p&gt;
&lt;p&gt;Required?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; true &lt;br /&gt;Position?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; named &lt;br /&gt;&lt;span style="background-color: #ffff00;"&gt;Default value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; False &lt;br /&gt;&lt;/span&gt;Accept pipeline input?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; false &lt;br /&gt;&lt;span style="background-color: #ffff00;"&gt;Accept wildcard characters?&amp;nbsp; false &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;PowerShell V2.0 didn&amp;rsquo;t provide any way to specify what help gets displayed for the highlighted fields above.&amp;nbsp; In PowerShell V2.0, we&amp;rsquo;ve fixed that.&lt;/p&gt;
&lt;p&gt;For default values, if you&amp;rsquo;ve specified a default value, we include that.&amp;nbsp; If you want finer control over what gets displayed, say to provide some context about the default value, you can use the attribute PSDefaultValue.&lt;/p&gt;
&lt;p&gt;If your parameter supports wildcards, you can add the SupportsWildCards attribute.&lt;/p&gt;
&lt;p&gt;Note that these 2 attributes are only used for help.&amp;nbsp; PowerShell doesn&amp;rsquo;t use these attributes for anything else.&lt;/p&gt;
&lt;p&gt;Here is an example:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Lucida Console'; color: darkblue; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt; &lt;span style="color: blueviolet;"&gt;Test-Something&lt;/span&gt;(&lt;span style="color: orangered;"&gt;$path&lt;/span&gt;) &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;{ &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; color: darkblue; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; param&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;(&lt;span style="color: darkgray;"&gt;[&lt;/span&gt;&lt;span style="color: deepskyblue;"&gt;PSDefaultValue&lt;/span&gt;(Help = &lt;span style="color: #8b0000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#8b0000" size="2"&gt;'A random number.'&lt;/span&gt;)&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$p&lt;/span&gt; = $(&lt;span style="color: #0000ff; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#0000ff" size="2"&gt;Get-Random&lt;/span&gt;), &lt;br /&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="color: darkgray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/span&gt;&lt;span style="color: deepskyblue;"&gt;SupportsWildcards&lt;/span&gt;()&lt;span style="color: darkgray;"&gt;]&lt;/span&gt;&lt;span style="color: orangered;"&gt;$q&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&lt;span style="font-size: x-small;" size="2"&gt;} &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000; font-family: Lucida Console; font-size: x-small;" face="Lucida Console" color="#000000" size="2"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #4f81bd; font-size: medium;" color="#4f81bd" size="4"&gt;Conclusion&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We hope these new language features make scripting easier and more fun.&amp;nbsp; In an upcoming post, we&amp;rsquo;ll cover other ways that we&amp;rsquo;ve made scripting easier.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jason Shirk &lt;br /&gt;Software Design Engineer &amp;ndash; Windows PowerShell &lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10317042" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/LANGUAGE/">LANGUAGE</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>Intellisense in Windows PowerShell ISE 3.0</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/13/intellisense-in-windows-powershell-ise-3-0.aspx</link><pubDate>Wed, 13 Jun 2012 01:30:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10319137</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10319137</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/13/intellisense-in-windows-powershell-ise-3-0.aspx#comments</comments><description>&lt;p&gt;&lt;em&gt;&lt;font color="#a5a5a5"&gt;This blog post applies to the Windows PowerShell Integrated Scripting Environment (ISE) in Windows 8 and Windows Server 2012.&amp;#160; The ISE is also fully supported and available when Server 2012 is deployed using the &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/03/20/building-an-optimized-private-cloud-using-windows-server-8-server-core.aspx"&gt;Minimal Server Interface&lt;/a&gt;.&amp;#160; To start ISE, type &lt;font style="background-color: rgb(255, 255, 255);"&gt;&lt;font face="Lucida Console"&gt;&lt;strong&gt;ise&lt;/strong&gt;&lt;/font&gt;&amp;#160; &lt;/font&gt;in a PowerShell console and press &lt;font face="Lucida Console"&gt;&lt;strong&gt;Enter&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Very few things can be considered “cool” in an interactive command-line environment. Intellisense sure counts as one of the few exceptions.&amp;#160; While tab completion has always been a cornerstone of PowerShell usability (and continues to be), my struggle with tab completion is that after cycling through the 5th option, I would have already forgotten the first 3 :-).&amp;#160; Discoverability is not optimal either, because a user doesn’t always know when tab completion would work, so it becomes a bit of a trial-and-error exercise.&amp;#160; Intellisense provides the following added benefits over tab completion:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Automatic drop-down when options are available – better discoverability&lt;/li&gt; &lt;li&gt;A view of a dozen (or so) options at a glance – no need to remember the options&lt;/li&gt; &lt;li&gt;Icons to help identify the type of options available&lt;/li&gt; &lt;li&gt;Syntax tooltips &lt;/li&gt; &lt;/ul&gt; &lt;em&gt;&lt;/em&gt; &lt;h3&gt;Commands, Parameters, and Values&lt;/h3&gt; &lt;p&gt;Type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;Set-&lt;/font&gt; and a list of cmdlets is dropped down (as well as scripts if you have any in the current path).&amp;#160; If you click (or navigate via keyboard) to &lt;font style="background-color: rgb(255, 255, 255);" face="Lucida Console"&gt;Set-ExecutionPolicy&lt;/font&gt; for example, a tooltip displays the syntax of the cmdlet.&amp;#160; Of course, if you start typing &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;Ex&lt;/font&gt;, the list in the drop-down is narrowed down to the matching set only. (More on matching later)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1643.image_5F00_5CE1C76B.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6445.image_5F00_thumb_5F00_5F8A831C.png" width="829" height="179" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You can press &lt;font face="Lucida Console"&gt;&lt;strong&gt;Enter&lt;/strong&gt;&lt;/font&gt; or &lt;strong&gt;&lt;font face="Lucida Console"&gt;Tab&lt;/font&gt;&lt;/strong&gt; to accept the value and once you press &lt;strong&gt;&lt;font face="Lucida Console"&gt;Space&lt;/font&gt;&lt;/strong&gt; and type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;-&lt;/font&gt;, another drop-down appears, this time with the parameter options:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8182.image_5F00_1F5469A2.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4477.image_5F00_thumb_5F00_18352D2A.png" width="280" height="184" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Go ahead and select &lt;font face="Lucida Console"&gt;–ExecutionPolicy&lt;/font&gt;, and once you press &lt;strong&gt;&lt;font face="Lucida Console"&gt;Space&lt;/font&gt;&lt;/strong&gt;, the allowed values appear (this works for enumerations and ValidateSet):&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6114.image_5F00_53F4C5DD.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6136.image_5F00_thumb_5F00_4CD58965.png" width="387" height="151" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;By the way … the Intellisense icon colors for parameters and parameter values match ISE’s default color scheme for parameters and parameter values.&amp;#160; Of course, if you’re typing in the console, parameters and parameter values have totally different colors to match the blue background, and you might be going: “Huh? what’s with the weird colors?” :-)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4073.image_5F00_45B64CED.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8267.image_5F00_thumb_5F00_538892E8.png" width="379" height="16" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Smart Matching&lt;/h3&gt; &lt;p&gt;When you type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;Get-&lt;/font&gt;, Intellisense kicks in.&amp;#160; If you continue to type &lt;font style="background-color: rgb(204, 204, 204);"&gt;Get-Switch&lt;/font&gt;, Intellisense displays all the options which match &lt;font face="Lucida Console"&gt;Get-*Switch*&lt;/font&gt;.&amp;#160; This comes in really handy when you’re looking for a cmdlet, and don’t remember its exact name or prefix.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4786.image_5F00_615AD8E3.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6433.image_5F00_thumb_5F00_5A3B9C6B.png" width="261" height="153" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;Paths&lt;/h3&gt; &lt;p&gt;Type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;dir c:\&lt;/font&gt; and Intellisense displays a list of files and folders (items) in the path you specified.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7103.image_5F00_15FB351F.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8182.image_5F00_thumb_5F00_3CC94B5F.png" width="254" height="158" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Here, too, we try to do smart matching: If you use &lt;font face="Lucida Console"&gt;Set-Location&lt;/font&gt;, we only display containers (folders), not files (items), since it wouldn’t make sense.&amp;#160; Here’s &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;cd c:\&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0753.image_5F00_6397619F.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3480.image_5F00_thumb_5F00_2E8AD26F.png" width="240" height="153" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Path completion works for any PowerShell provider, not just the file system. Try: &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;dir hklm:\&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6136.image_5F00_5558E8AF.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0763.image_5F00_thumb_5F00_7C26FEEF.png" width="203" height="112" /&gt;&lt;/a&gt;Note that using tab completion and/or Intellisense with environment variables may produce undesired results, for example when you’re trying to specify the Windows folder using the SystemDrive environment variable: &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8015.image_5F00_7ECFBAA0.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7028.image_5F00_thumb_5F00_259DD0E1.png" width="148" height="39" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When you press &lt;font face="Lucida Console"&gt;&lt;strong&gt;Enter&lt;/strong&gt;&lt;/font&gt; or &lt;strong&gt;&lt;font face="Lucida Console"&gt;Tab&lt;/font&gt;&lt;/strong&gt;, the entire string becomes: “C:\Windows&amp;quot;, which is machine-specific, and may not be what you want.&lt;/p&gt; &lt;h3&gt;Variables&lt;/h3&gt; &lt;p&gt;As soon as you type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;$&lt;/font&gt;, Intellisense kicks in, showing user-defined and pre-defined variables:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2313.image_5F00_709141B0.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8512.image_5F00_thumb_5F00_7E6387AB.png" width="232" height="142" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;History&lt;/h3&gt; &lt;p&gt;Type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;#&lt;/font&gt; followed by &lt;font face="Lucida Console"&gt;&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;/font&gt;+&lt;strong&gt;&lt;font face="Lucida Console"&gt;Space&lt;/font&gt;&lt;/strong&gt; to show your command history at a glance:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3806.image_5F00_0C35CDA7.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5543.image_5F00_thumb_5F00_3303E3E7.png" width="240" height="128" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Types &amp;amp; Namespaces&lt;/h3&gt; &lt;p&gt;Another cool feature is namespace completion.&amp;#160; Try &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;[Initials&lt;/font&gt; and press &lt;font face="Lucida Console"&gt;&lt;font face="Lucida Console"&gt;&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;/font&gt;+&lt;strong&gt;&lt;font face="Lucida Console"&gt;Space&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6114.image_5F00_59D1FA27.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6136.image_5F00_thumb_5F00_67A44022.png" width="198" height="80" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Press &lt;strong&gt;&lt;font face="Lucida Console"&gt;Enter&lt;/font&gt;&lt;/strong&gt;&lt;font face="Segoe UI"&gt; and you should see the namespace &amp;amp; type expanded to: &lt;/font&gt;&lt;font face="Lucida Console"&gt;[System.Management.Automation.Runspaces.InitialSessionState&lt;/font&gt;&lt;font face="Segoe UI"&gt;.&amp;#160; Yes, this means that you no longer have to know which namespace a type lives in, before you can use it. :-)&lt;/font&gt;&lt;/p&gt; &lt;h3&gt;Properties &amp;amp; Methods&lt;/h3&gt; &lt;p&gt;Try &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;[int]::&lt;/font&gt; and notice how Intellisense kicks in and displays the static members of the integer class:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7607.image_5F00_608503AA.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6840.image_5F00_thumb_5F00_5965C732.png" width="215" height="123" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Try &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;(“PowerShell rocks!”).&lt;/font&gt; (notice the period at the end), and observe how Intellisense kicks in and displays the members of the string object:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5852.image_5F00_15255FE6.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8508.image_5F00_thumb_5F00_0E06236E.png" width="297" height="153" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Helpful Tips&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;If you accidentally dismiss the Intellisense drop-down, use &lt;font face="Lucida Console"&gt;&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;/font&gt;+&lt;strong&gt;&lt;font face="Lucida Console"&gt;Space&lt;/font&gt;&lt;/strong&gt; to invoke Intellisense again.&lt;/li&gt; &lt;li&gt;Use the Options dialog if you want to turn Intellisense ON/OFF for each pane, or if you want to change the default behavior of the &lt;font face="Lucida Console"&gt;&lt;strong&gt;Enter&lt;/strong&gt;&lt;/font&gt; key for selection.&lt;/li&gt; &lt;li&gt;Here is the list of icons and what they mean:&lt;/li&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6445.image_5F00_06E6E6F6.png"&gt;&lt;img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7026.image_5F00_thumb_5F00_29AAAF64.png" width="20" height="20" /&gt;&lt;/a&gt;: Command&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0753.image_5F00_749E2033.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0675.image_5F00_thumb_5F00_4959892C.png" width="20" height="20" /&gt;&lt;/a&gt;: Container&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7522.image_5F00_423A4CB4.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4478.image_5F00_thumb_5F00_221F3FF7.png" width="20" height="20" /&gt;&lt;/a&gt;: File / item&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0268.image_5F00_16F5B5AD.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7115.image_5F00_thumb_5F00_48ED5637.png" width="20" height="20" /&gt;&lt;/a&gt;: Method&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6840.image_5F00_3DC3CBED.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4786.image_5F00_thumb_5F00_1DA8BF30.png" width="20" height="20" /&gt;&lt;/a&gt;: Property&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3718.image_5F00_2B7B052B.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3731.image_5F00_thumb_5F00_245BC8B3.png" width="20" height="20" /&gt;&lt;/a&gt;: Parameter&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5468.image_5F00_601B6166.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0753.image_5F00_thumb_5F00_06E977A7.png" width="20" height="20" /&gt;&lt;/a&gt;: Parameter value&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8270.image_5F00_2DB78DE7.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8203.image_5F00_thumb_5F00_6D81746C.png" width="20" height="20" /&gt;&lt;/a&gt;: Variable&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7115.image_5F00_666237F4.png"&gt;&lt;img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/8015.image_5F00_thumb_5F00_2221D0A8.png" width="20" height="20" /&gt;&lt;/a&gt;: History&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7028.image_5F00_1B029430.png"&gt;&lt;img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/7041.image_5F00_thumb_5F00_13E357B8.png" width="21" height="22" /&gt;&lt;/a&gt;: Type&lt;/li&gt; &lt;/ul&gt; &lt;/ul&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;h3&gt;More Cool Intellisense&lt;/h3&gt; &lt;p&gt;Start a new script and type: &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;$x = Get-Process m*&lt;/font&gt;.&amp;#160; Without even running this, as soon as you type &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;$x.&lt;/font&gt;, you see Intellisense for the members of a &lt;u&gt;process&lt;/u&gt; object. :-)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2235.image_5F00_4FA2F06B.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3324.image_5F00_thumb_5F00_4883B3F3.png" width="240" height="194" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You can experience this at the command line as well: Try &lt;font style="background-color: rgb(204, 204, 204);" face="Lucida Console"&gt;Get-Service a* | where {$_.&lt;/font&gt; and notice how Intellisense kicks in, and displays all members of a service object.&amp;#160; No more Get-Member before you run a where filter :-)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6052.image_5F00_6F51CA33.png"&gt;&lt;img title="image" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/3312.image_5F00_thumb_5F00_440D332C.png" width="314" height="133" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;This is just the tip of the iceberg, so look out for an upcoming blog from Jason Shirk on more cool Intellisense features.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;ref@ &lt;/p&gt; &lt;p&gt;Refaat Issa&lt;/p&gt; &lt;p&gt;Program Manager, Windows Server Manageability&lt;/p&gt; &lt;p&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10319137" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+ISE/">PowerShell ISE</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>Windows Management Framework 3.0 RC is Available for Download</title><link>http://blogs.msdn.com/b/powershell/archive/2012/06/02/windows-management-framework-3-0-rc-is-available-for-download.aspx</link><pubDate>Fri, 01 Jun 2012 23:12:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10313843</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10313843</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/06/02/windows-management-framework-3-0-rc-is-available-for-download.aspx#comments</comments><description>&lt;p&gt;Yesterday we published an RC version of the Windows Management Framework 3.0.&lt;/p&gt; &lt;p&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=251995"&gt;Windows Management Framework 3.0 RC&lt;/a&gt; makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 RC can be installed on the following Operating Systems:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Windows 7 Service Pack 1 (32-bit &amp;amp; 64-bit)&lt;/li&gt; &lt;li&gt;Windows Server 2008 R2 Service Pack 1 (64-bit only) – Server Core now supported with the RC release.&lt;/li&gt; &lt;li&gt;Windows Server 2008 Service Pack 2 (32-bit &amp;amp; 64-bit) – &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The package also includes a CIM provider that allows you to collect management data from servers with Windows Management Framework 3.0 installed with the new Server Manager in &lt;a href="http://technet.microsoft.com/en-us/evalcenter/hh670538.aspx"&gt;Windows Server 2012 RC&lt;/a&gt;.&amp;#160; &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Feedback &amp;amp; Bugs&lt;/strong&gt;&lt;strong&gt; &lt;br /&gt;&lt;/strong&gt;We welcome any feedback or bug submissions to the Windows PowerShell Connect site: &lt;a href="http://connect.microsoft.com/PowerShell"&gt;http://connect.microsoft.com/PowerShell&lt;/a&gt;. The release notes for Windows Management Framework 3.0 RC include a list of user submitted Connect bugs that have been fixed since Windows Management Framework 3.0 Beta.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Additional Information: &lt;br /&gt;&lt;/strong&gt;Release notes are available on the download page. They contain important information about changes since Windows PowerShell 2.0 and a list of known issues.&lt;/p&gt; &lt;p&gt;You must uninstall any other copies of Windows Management Framework 3.0 before installing Windows Management Framework 3.0 RC.&lt;/p&gt; &lt;p&gt;This software is a pre-release version. Features and behavior are likely to change before the final release.&lt;/p&gt; &lt;p&gt;Check out the two blog posts about PowerShell 3.0 written by Jeffrey Snover on the Windows Server blog this week: &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/05/29/windows-server-2012-powershell-3-0-and-devops-part-1.aspx"&gt;Part I&lt;/a&gt; &amp;amp; &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/05/30/windows-server-2012-powershell-3-0-and-devops-part-2.aspx"&gt;Part II&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Travis Jones [MSFT] &lt;br /&gt;Program Manager – Windows PowerShell &lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10313843" width="1" height="1"&gt;</description></item><item><title>Going to TechEd? Join Us to Build a Solution on Windows PowerShell 3.0</title><link>http://blogs.msdn.com/b/powershell/archive/2012/05/09/going-to-teched-join-us-to-build-a-solution-on-windows-powershell-3-0.aspx</link><pubDate>Wed, 09 May 2012 16:39:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10303299</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10303299</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/05/09/going-to-teched-join-us-to-build-a-solution-on-windows-powershell-3-0.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;To cap off TechEd North America this year we are going to host a half day Windows PowerShell scenario walkthrough. &lt;/p&gt; &lt;p&gt;The event will take place at the Rosen Center on Friday June 15 from 8am – noon. During this time we will collectively solve a problem from the ground up using many of the new features in Windows PowerShell 3.0 and Windows Server 2012. &lt;/p&gt; &lt;p&gt;Starting from base Windows Server 2012 images, we will walk you through:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Writing a PowerShell script workflow to perform Server deployments&lt;/li&gt; &lt;li&gt;Creating a constrained endpoint that hosts only the deployment workflow&lt;/li&gt; &lt;li&gt;Delegate a set of credentials for the workflow to use&lt;/li&gt; &lt;li&gt;Exposing the workflow and it's results through a RESTful webservice&lt;/li&gt; &lt;li&gt;Using Windows PowerShell Web Access to manage the workflow&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;You will need to bring your own laptop to follow along.&lt;/p&gt; &lt;p&gt;Our room has space to accommodate 40 people.&amp;#160; If you are interested please send a note to us at &lt;a href="mailto:powershellteam@hotmail.com"&gt;powershellteam@hotmail.com&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Thanks&lt;/p&gt; &lt;p&gt;Travis Jones [MSFT] &lt;br /&gt;Program Manager – Windows PowerShell &lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10303299" width="1" height="1"&gt;</description></item><item><title>Running show-command for a cmdlet</title><link>http://blogs.msdn.com/b/powershell/archive/2012/04/13/running-show-command-for-a-cmdlet.aspx</link><pubDate>Fri, 13 Apr 2012 01:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10293413</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10293413</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/04/13/running-show-command-for-a-cmdlet.aspx#comments</comments><description>&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h4&gt;Problem: Figuring out a cmdlet from its syntax can be overwhelming, especially for people new to PowerShell.&lt;/h4&gt;
&lt;p&gt;PS C:\&amp;gt; get-command get-process -syntax&lt;/p&gt;
&lt;p&gt;Get-Process [[-Name] &amp;lt;string[]&amp;gt;] [-ComputerName &amp;lt;string[]&amp;gt;] [-Module] [-FileVersionInfo] [&amp;lt;CommonParameters&amp;gt;]&lt;/p&gt;
&lt;p&gt;Get-Process -Id &amp;lt;int[]&amp;gt; [-ComputerName &amp;lt;string[]&amp;gt;] [-Module] [-FileVersionInfo] [&amp;lt;CommonParameters&amp;gt;]&lt;/p&gt;
&lt;p&gt;Get-Process -InputObject &amp;lt;Process[]&amp;gt; [-ComputerName &amp;lt;string[]&amp;gt;] [-Module] [-FileVersionInfo] [&amp;lt;CommonParameters&amp;gt;]&lt;/p&gt;
&lt;p&gt;Get-command &amp;ndash;syntax displays the syntax for the command. The top of get-help will also show this syntax information.&lt;/p&gt;
&lt;h4&gt;What are all those lines and braces?&lt;/h4&gt;
&lt;p&gt;If you know the answer, please skip this section.&lt;/p&gt;
&lt;p&gt;There is one line per parameter set. The square braces around a parameter indicate the parameter is optional. Square braces around a parameter name, indicate the name is optional (which means the parameter is positional). Angle brackets indicate the parameter type.&lt;/p&gt;
&lt;p&gt;A Parameter Set is a mutually exclusive set of parameters. Mutually exclusive means you can either get a process by name, or by id, but not by name and id at the same time. Each parameter set is a different way to interact with the cmdlet, almost like a different cmdlet with the same name.&lt;/p&gt;
&lt;p&gt;Some can ask if the parameter sets are a necessary complication. The only way to achieve the same 3 ways to get a process without something like parameter sets would be to have 3 cmdlets like Get-ProcessByName, Get-ProcessById and Get-ProcessByInputObject. If we extend this idea to all cmdlets, Nouns would be on average larger, there would be several names to remember for each cmdlet, separate documentations would be necessary and they would have repeated content referring to what is common between the cmdlets, etc. In summary, Parameter Sets are a great way to solve a somewhat complex problem of different ways to call a cmdlet.&lt;/p&gt;
&lt;p&gt;Despite all this greatness, all those braces and lines can be a bit overwhelming for people starting PowerShell and trying to understand a cmdlet (and even for some experts, at a first glance).&lt;/p&gt;
&lt;h4&gt;Solution: Show-Command is a new cmdlet in PowerShell V3 that displays a graphical user interface for a command with a simpler overview of a cmdlet.&lt;/h4&gt;
&lt;p&gt;PS C:\&amp;gt; Show-Command Get-Process&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/5756.clip_5F00_image002_5F00_6064E5CD.jpg"&gt;&lt;img width="287" height="338" title="clip_image002" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" alt="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0042.clip_5F00_image002_5F00_thumb_5F00_7241799A.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Each tab is one Parameter Set for Get-Process. Cmdlets with parameter sets have a default parameter set. In case of get-process the default parameter set is Name, so this is the tab selected by default. Selecting the other tabs will display the following results:&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table align="center" style="width: 569px;" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="287" valign="top"&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4274.clip_5F00_image004_5F00_0013BF96.jpg"&gt;&lt;img width="267" height="317" title="clip_image004" style="display: inline; background-image: none;" alt="clip_image004" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/4744.clip_5F00_image004_5F00_thumb_5F00_0DE60591.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="280" valign="top"&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0363.clip_5F00_image006_5F00_3FDDA61B.jpg"&gt;&lt;img width="268" height="318" title="clip_image006" style="display: inline; background-image: none;" alt="clip_image006" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1033.clip_5F00_image006_5F00_thumb_5F00_38BE69A3.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Notice that for Name, the Run button is enabled and for Id and InputObject, Run is disabled. This is because there is no mandatory parameter in the Name parameter set, so it is ready to run, even with no parameter values. The Id parameter in the Id parameter set is mandatory (needs a value). This is indicated by the * near the parameter name. The InputObject parameter in the InputObject parameter set is also mandatory.&lt;/p&gt;
&lt;p&gt;It is a very simple GUI, but it achieved some nice results so far regarding the problem it set out to solve:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Initially, the parameters for only one parameter set are displayed (the default parameter set), reducing the information to be understood compared to the syntax.&lt;/li&gt;
&lt;li&gt;The braces indicating optional parameters are replaced by the friendlier GUI language of * and enabled/disabled buttons.&lt;/li&gt;
&lt;li&gt;The visual separation of the parameter set tabs is an excellent way to convey they are mutually exclusive.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additional details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In each parameter set tab, parameter names are displayed alphabetically, but mandatory parameters are listed first.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;The command run will be placed in history, so if you use &amp;ldquo;Arrow Up&amp;rdquo; after running show-command, you can see/modify what was run.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;The Common Parameters section displays Debug, ErrorAction and other parameters common to all cmdlets.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;The Copy button will copy the cmdlet to be run to the clipboard.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Hovering over a parameter will display a tooltip with additional information about the parameter:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1856.clip_5F00_image008_5F00_319F2D2B.jpg"&gt;&lt;img width="278" height="330" title="clip_image008" style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" alt="clip_image008" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/0451.clip_5F00_image008_5F00_thumb_5F00_1184206E.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Lucio Silveira [MSFT]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10293413" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+ISE/">PowerShell ISE</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Windows+Server+2012/">Windows Server 2012</category></item><item><title>Microsoft Script Explorer for Windows PowerShell Beta 1 Now Available</title><link>http://blogs.msdn.com/b/powershell/archive/2012/04/09/microsoft-script-explorer-for-windows-powershell-beta-1-now-available.aspx</link><pubDate>Mon, 09 Apr 2012 22:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10292046</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10292046</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/04/09/microsoft-script-explorer-for-windows-powershell-beta-1-now-available.aspx#comments</comments><description>&lt;p&gt;We are very excited to announce the availability of Microsoft Script Explorer for Windows PowerShell (Script Explorer) Beta 1. Script Explorer is an extension of the Windows PowerShell content and guidance experience, combining the vast amount of knowledge held in the community with resources that are available from Microsoft.&lt;/p&gt;
&lt;p&gt;Script Explorer is integrated as an Add-On to Windows PowerShell Integrated Scripting Environment (ISE).&amp;nbsp; With Script Explorer, you can:&lt;/p&gt;
&lt;p&gt;&amp;middot; Discover information that is related to Windows PowerShell from across the community and Microsoft.&lt;/p&gt;
&lt;p&gt;&amp;middot; Search seamlessly across repositories such as the Microsoft TechNet Script Center and PoshCode.org to locate samples that are relevant to you.&lt;/p&gt;
&lt;p&gt;&amp;middot; Establish, grow, and search local file systems and corporate repositories.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Search across multiple repositories&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Script Explorer enables a single search experience across multiple repositories, including local file system, network file share, PoshCode.org and the Microsoft Script Center, which allows you to locate script samples, snippets, and modules. You can filter search results, read reviews and comments, and seamlessly integrate script code into Windows PowerShell ISE or other script editors.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Community and Microsoft guidance in one place&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Script Explorer combines the rich information from the community and the guidance that is available from Microsoft, which helps you realize more of the benefits of Windows PowerShell. Script Explorer brings together resources such as the Windows PowerShell Survival Guide and how-to guidance.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Build a trusted library of scripts for your company&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Script Explorer makes it easy to build a library of scripts for personal use or to establish and grow a corporate library of trusted scripts, modules, and snippets.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2514.Script_2D00_Explorer_5F00_0C44959C.jpg"&gt;&lt;img width="535" height="373" title="Script Explorer" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" alt="Script Explorer" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/6708.Script_2D00_Explorer_5F00_thumb_5F00_371CF9AE.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As shown in the illustration, Script Explorer allows you to search for PowerShell scripts on your local computer, your local network and intranet, and online script repositories. You are shown available scripts organized by category, and you can search for scripts from local and trusted community repositories by applying filters based on focus areas.&amp;nbsp; Script search results return information about script usage, code samples, and details about the scripts.&lt;/p&gt;
&lt;p&gt;When you find the scripts you that you need, you can store the scripts locally and use them at a later time or you can insert/copy in the editor.&lt;/p&gt;
&lt;p&gt;Script Explorer isn't just about scripts. It also allows you to find other Windows PowerShell information such as modules, script snippets and even allows you to view how-to guidance topics from Windows PowerShell cmdlets and community resources, such as TechNet Wiki pages, to help you get started using Windows PowerShell.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Free download now!&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Get started today with this free download of &lt;a href="http://go.microsoft.com/fwlink/?LinkId=246229"&gt;Microsoft Script Explorer for Windows PowerShell Beta 1&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Extensibility&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;You can also extend Script Explorer to include your own repository by using the &lt;a href="http://scriptexplorer.codeplex.com/"&gt;Script Explorer Repository SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Support&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;For support, visit &lt;a href="http://social.technet.microsoft.com/Forums/en-US/scriptexplorer"&gt;Script Explorer for Windows PowerShell&lt;/a&gt; at the Microsoft Script Center online forums.&lt;/p&gt;
&lt;p&gt;Also visit the forum for the latest status on Script Explorer services, to ask questions, and to provide feedback about Script Explorer. If you currently host a public repository, and you would like to make it available through Script Explorer, please contact &lt;a href="mailto:secustsupp" target="_blank"&gt;Microsoft Script Explorer Customer Support&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Additional information&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/8051.deploying-microsoft-script-explorer-for-windows-powershell.aspx"&gt;Deploying Microsoft Script Explorer for Windows PowerShell &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/8052.configure-the-microsoft-script-explorer-for-windows-powershell-aggregation-service.aspx"&gt;Configuring Microsoft Script Explorer for Windows PowerShell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/8053.uninstalling-the-microsoft-script-explorer-for-windows-powershell.aspx"&gt;Uninstalling Microsoft Script Explorer for Windows PowerShell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/8054.troubleshooting-the-microsoft-script-explorer-for-windows-powershell.aspx"&gt;Troubleshooting Microsoft Script Explorer for Windows PowerShell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/8056.microsoft-script-explorer-for-windows-powershell-user-guide.aspx"&gt;Using Microsoft Script Explorer for Windows PowerShell&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Joshy Joseph [MSFT]&lt;br /&gt;Program Manager&lt;br /&gt;Windows Server Information Experience&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10292046" width="1" height="1"&gt;</description></item><item><title>Improved WMI experience in PowerShell 3.0</title><link>http://blogs.msdn.com/b/powershell/archive/2012/04/04/improved-wmi-experience-in-powershell-3-0.aspx</link><pubDate>Wed, 04 Apr 2012 08:21:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10290660</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10290660</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/04/04/improved-wmi-experience-in-powershell-3-0.aspx#comments</comments><description>&lt;p&gt;There is a famous quote often attributed to Jeffrey Snover, &amp;ldquo;IT Pros love and hate WMI. They love it because there is so much great stuff there. They hate it because it is complex to use&amp;rdquo;. Not to our surprise, most of the IT Pros and developers we talked to agree with this.&lt;/p&gt;
&lt;p&gt;This is going to change with Windows &amp;ldquo;8&amp;rdquo;. We listened to your feedback and have made heavy investment in this area. This blog post &lt;a href="http://blogs.technet.com/b/windowsserver/archive/2012/03/30/standards-based-management-in-windows-server-8.aspx"&gt;standards based management in Windows Server 8&lt;/a&gt; by Jeffrey Snover and Wojtek Kozaczynski provides an&amp;nbsp;excellent overview. I would like to highlight two important aspect of improved PS+WMI integration that Wojtek talked about..&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;CIM Cmdlets:&lt;/strong&gt; &amp;nbsp;&lt;b&gt;PowerShell cmdlets to manage Standard Compliant CIM capable systems. &lt;/b&gt;Now you can manage any CIM+WSMan compliant&amp;nbsp;system using the same set of cmdlets shipping with PowerShell 3.0. Imagine managing a hardware device or a non-Windows server from PowerShell, just like you would manage Windows.&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;CIM-Based Cmdlets&lt;/strong&gt;&lt;b&gt;: PowerShell cmdlets written as a CIM Provider. &lt;/b&gt;For many IT Pros, terms like CIM operations, namespace, associations seemed to be way too complex, and many of them get nightmare about not getting WQL right. We heard the shout loud and clear. We are giving WMI developer right infrastructure and API to write cmdlets in native code, complete with PS semantics like verbose, warning, whatif/confirm etc. Out of the box, Windows "8" ships with a large number of new cmdlets that have been implemented as a WMI provider.&lt;/p&gt;
&lt;p&gt;Our goal in&amp;nbsp;PowerShell 3.0&amp;nbsp;is to provide &amp;nbsp;'first-class'&amp;nbsp; experience for WMI. In the next few weeks, we will take you through a deep dive providing details of these&amp;nbsp;investments . Stay tuned.&lt;/p&gt;
&lt;p&gt;- Osama Sajid&lt;/p&gt;
&lt;p&gt;Program Manager, WMI&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10290660" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/WMI/">WMI</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/WsMan/">WsMan</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/CIM/">CIM</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/WinRM/">WinRM</category><category domain="http://blogs.msdn.com/b/powershell/archive/tags/Powershell+3-0/">Powershell 3.0</category></item><item><title>Schedule for the upcoming PowerShell Deep Dive and a few videos from Frankfurt</title><link>http://blogs.msdn.com/b/powershell/archive/2012/03/26/schedule-for-the-upcoming-powershell-deep-dive-and-a-few-videos-from-frankfurt.aspx</link><pubDate>Sun, 25 Mar 2012 23:50:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10287383</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10287383</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/03/26/schedule-for-the-upcoming-powershell-deep-dive-and-a-few-videos-from-frankfurt.aspx#comments</comments><description>&lt;p&gt;We&amp;rsquo;ve got a great lineup of sessions and speakers scheduled for the upcoming PowerShell Deep Dive in San Diego, CA on April 30 &amp;ndash; May 2! The &lt;a href="http://www.theexpertsconference.com/us/2012/powershell-deep-dive/agenda/"&gt;schedule&lt;/a&gt;&amp;nbsp;was recently published on The Experts Conference site&lt;a href="http://www.theexpertsconference.com/us/2012/"&gt;,&lt;/a&gt; and is also listed below for convenience. Be sure to check out the TEC site for abstracts and speaker bios.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re still thinking about registering, it is not too late. Just follow the instructions listed on &lt;a href="http://blogs.msdn.com/b/powershell/archive/2012/01/27/it-s-time-for-another-powershell-deep-dive.aspx"&gt;this earlier blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are a couple videos from last PowerShell Deep Dive in Frankfurt that Dmitry Sotnikov has recently posted on his blog:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dmitrysotnikov.wordpress.com/2012/03/22/video-james-oneill-and-his-powershell-profile/"&gt;James O&amp;rsquo;Neill &lt;/a&gt;and his PowerShell Profile (part of the Lightning round)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dmitrysotnikov.wordpress.com/2012/03/19/video-tobial-weltner-regular-expressions-in-5-minutes/"&gt;Tobias Weltner &lt;/a&gt;on Regular Expressions in 5 minutes (also part of the Lightninground)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dmitrysotnikov.wordpress.com/2012/03/14/video-bruce-payette-powershell-workflows/"&gt;Bruce Payette&lt;/a&gt; covers Windows PowerShell Workflows in PowerShell 3.0. CTP2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And now for the schedule:&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="3"&gt;
&lt;p&gt;Monday&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Time&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Session&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Speaker&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;9:00 - 10:00am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;PowerShell Deep Dive Keynote&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Jeffrey Snover&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;10:00 - 10:30am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Break&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;10:30&amp;nbsp;- 11:05am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;When old APIs save the day (pinvoke and native windows dlls)&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Tome Tanasovski&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;11:10 -&amp;nbsp;11:45am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Proxy functions&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Kirk Munro&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;11:45 -&amp;nbsp;1:00pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Lunch&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;1:00 - 2:15pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap" rowspan="2"&gt;
&lt;p&gt;Using Splunk ResKit with PowerShell to revolutionize your script process&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap" rowspan="2"&gt;
&lt;p&gt;Brandon&amp;nbsp;Shell&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;2:20&amp;nbsp;- 2:55pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Lightning&amp;nbsp;Round&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;3:00 - 3:45pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Remoting in V3&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Krishna Vutukuri&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;3:45&amp;nbsp;- 4:15pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Break&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;4:15&amp;nbsp;- 5:30pm&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;New&amp;nbsp;Hyper-V PowerShell Module in Windows Server 8&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap" rowspan="2"&gt;
&lt;p&gt;Adam&amp;nbsp;Driscoll&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;5:30&amp;nbsp;- 6:30pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Meet the experts&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;6:00 - 8:00pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;TEC Party&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Tuesday&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;8:00&amp;nbsp;- 8:35am&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Formatting in Windows PowerShell&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Jim Truher&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;8:40&amp;nbsp;- 9:15am&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;PowerShell&amp;nbsp;and WMI: a love story&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Kirk&amp;nbsp;Munro&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;9:15&amp;nbsp;- 9:45am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Break&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;9:45&amp;nbsp;- 11:00am&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;PowerShell as a Web Language&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;James Brundage&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;11:15&amp;nbsp;- 11:50am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;PowerShell V3 in Production&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Steven Murawski&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;11:55&amp;nbsp;- 12:30pm&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Lightning&amp;nbsp;Round&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;12:30&amp;nbsp;- 1:45pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Lunch&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;1:45&amp;nbsp;- 3:00pm&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;How Microsoft IT Uses PowerShell for Testing Automation and Deployment of FIM&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;Kinnon McDonell&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;3:15&amp;nbsp;- 3:50pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Job&amp;nbsp;Types in Windows PowerShell 3.0&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Travis&amp;nbsp;Jones&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;3:55 - 4:30pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Creating&amp;nbsp;a corporate PowerShell Module Repository&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;Tome&amp;nbsp;Tanasovski&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;4:30&amp;nbsp;- 5:00pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Break&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;5:00&amp;nbsp;- 6:00pm&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;BOF&amp;nbsp;/ Roundtable&lt;/p&gt;
&lt;/td&gt;
&lt;td nowrap="nowrap"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;Wednesday&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;8:00&amp;nbsp;- 8:35am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Cmdlets over Objects (CDXML)&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Richard Siddaway&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;8:40&amp;nbsp;- 9:15am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Build your own remoting endpoint with PowerShell v3&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Aleksandar Nikolic&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;9:15&amp;nbsp;- 9:45am&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Break&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;9:45&amp;nbsp;- 11:00am&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;PowerShell Workflows and the Windows Workflow Foundation for the IT Pro&lt;/p&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;p&gt;Steven Murawski&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;11:15&amp;nbsp;- 12:50pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Incorporating Microsoft Office into Windows PowerShell&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Jeffrey Hicks&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;11:55&amp;nbsp;- 12:30pm&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;TBD&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Bruce Payette&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;12:30&amp;nbsp;- 1:45pm&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Lunch&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt;
&lt;p&gt;Travis Jones [MSFT]&lt;br /&gt;Program Manager - Windows PowerShell&lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10287383" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/powershell/archive/tags/PowerShell+Deep+Dive/">PowerShell Deep Dive</category></item><item><title>Troubleshooting Windows Management Framework 3.0 Beta Installation</title><link>http://blogs.msdn.com/b/powershell/archive/2012/03/23/troubleshooting-windows-management-framework-3-0-beta-installation.aspx</link><pubDate>Fri, 23 Mar 2012 00:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10286675</guid><dc:creator>PowerShell Team</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/powershell/rsscomments.aspx?WeblogPostID=10286675</wfw:commentRss><comments>http://blogs.msdn.com/b/powershell/archive/2012/03/23/troubleshooting-windows-management-framework-3-0-beta-installation.aspx#comments</comments><description>&lt;p&gt;This blog post explains how to resolve problems that may occur when you install Windows Management Framework (WMF) 3.0 Beta. WMF 3.0 Beta includes Windows PowerShell 3.0 Beta. You can find the WMF 3.0 Beta installation package on the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=240290.&lt;/p&gt;
&lt;p&gt;The WMF 3.0 package installation is blocked when one or more of the following prerequisites are not met:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The package must support the platform and operating system.&lt;/li&gt;
&lt;li&gt;Prerequisites must be met.&lt;/li&gt;
&lt;li&gt;The package must not be a duplicate.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When one or more of the conditions is not met, an error message, such as the following one, explains that the update does not apply to the system.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/1351.clip_5F00_image001_5F00_2084D1A6.png"&gt;&lt;img style="margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-63-74-metablogapi/2821.clip_5F00_image001_5F00_thumb_5F00_527C7230.png" width="207" height="102" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;WMF 3.0 Beta is shipped in four different packages. Each package is designed for a different operating system and service pack and a specific architecture. The following table lists the WMF 3.0 Beta packages:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="width: 468px;" border="1" cellspacing="0" cellpadding="2" align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="200"&gt;WMF 3.0 Package&lt;/td&gt;
&lt;td valign="top" width="266"&gt;Target OS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="200"&gt;
&lt;p&gt;Windows6.1-KB2506143-x86.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="266"&gt;
&lt;p&gt;Windows 7 SP1 Client (x86)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="200"&gt;
&lt;p&gt;Windows6.1-KB2506143-x64.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="266"&gt;
&lt;p&gt;Windows 7 SP1 Client (amd64), Windows 2008 R2 SP1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="200"&gt;
&lt;p&gt;Windows6.0-KB2506146-x86.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="266"&gt;
&lt;p&gt;Windows 2008 SP2 (x86)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="200"&gt;
&lt;p&gt;Windows6.0-KB2506146-x64.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="266"&gt;
&lt;p&gt;Windows 2008 SP2 (amd64)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;b&gt;WMF 3.0 Beta Validation:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If Windows PowerShell is installed on the computer, you can use the &lt;b&gt;WMF3BetaPrerequisiteCheck.ps1&lt;/b&gt;script that is attached to this blog post to verify that WMF 3.0 Beta is installed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Package applicability:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The installation of the package might fail for one of the following reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Architecture:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;WMF 3.0 Beta packages are applicable only to computers with x86 and x64 architectures. WMF 3.0 Beta package installation fails if you try to install an x86 version of the package on an x64 computer, or an x64 version on an x86 computer.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Operating system:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;WMF 3.0 Beta package is applicable only to Windows 7 with Service Pack 1, Windows Server 2008 R2 with Service Pack 1, and Windows Server 2008 with Service Pack 2.The WMF 3.0 Beta package installation fails on all other operating systems.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Service pack:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;WMF 3.0 Beta package installation fails when the target computer does not have the minimum required service packs installed. The minimum service pack requirements are as follows:&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Windows 7, Windows Server 2008 R2: Service Pack 1&lt;/li&gt;
&lt;li&gt;Windows Server 2008 : Service Pack 2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following table summarizes the WMF 3.0 Beta package applicability&lt;/p&gt;
&lt;div align="center"&gt;
&lt;table style="width: 500px;" border="1" cellspacing="0" cellpadding="0" align="center"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows6.1-KB2506143-x86.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows6.1-KB2506143-x64.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows6.0-KB2506146-x86.msu&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows6.0-KB2506146-x64.msu&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows 7 SP1 (x86)&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p align="center"&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows 7 SP1 (x64)&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows Server 2008 R2 SP1 (x64)&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows Server 2008 SP2 (x86)&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Windows Server 2008 SP2 (x64)&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="20%"&gt;
&lt;p&gt;Yes&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;b&gt;Prerequisites:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The following items are required for WMF 3.0 Beta package installation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microsoft .NET Framework 4: Full Installation:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;The Microsoft .NET Framework 4 full installation must be installed on the computer before installing WMF 3.0 Beta.&lt;/li&gt;
&lt;li&gt;To verify that .NET 4 full installation is installed on the computer, use one of the following methods:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Check for the presence of the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. The key should contain the &lt;b&gt;Install&lt;/b&gt; registry entry with a value of 1.&lt;/li&gt;
&lt;li&gt;In Programs and Features in Control Panel, check for the presence of the &amp;ldquo;Microsoft .NET Framework 4 Extended&amp;rdquo; update.&lt;/li&gt;
&lt;li&gt;To install Microsoft.NET Framework 4 Full installation, go to &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=17718"&gt;http://www.microsoft.com/download/en/details.aspx?id=17718&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;Windows Management Framework 2.0 [WMF 2.0]:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If the computer is running Windows Server 2008 SP2, you need to install WMF 2.0 before installing WMF 3.0 Beta. WMF 2.0 is not required for any other operating systems. You can download WMF 2.0 from &lt;a href="http://support.microsoft.com/kb/968930"&gt;http://support.microsoft.com/kb/968930&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;To verify that WMF 2.0 is installed on the computer, in Programs and Features in Control Panel, in Installed Updates, search for the &lt;b&gt;Windows Management Framework Core (KB 968930)&lt;/b&gt; update.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Duplicate package installation:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If either the current version, on an earlier version of the WMF 3.0 Beta package is already installed on the computer, the WMF 3.0 Beta installation fails with the following error message: "Update for Windows (KB250614X) is already installed on this computer."&lt;/p&gt;
&lt;p&gt;To fix this problem, use the following procedure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;On Windows 7 SP1 and Windows Server 2008 R2 SP1, use Programs and Features in Control Panel to uninstall update KB2506143. To find it, click &lt;b&gt;View installed updates&lt;/b&gt; and then search for KB2506143.&lt;/li&gt;
&lt;li&gt;On Windows Server 2008 SP2, use Programs and Features in Control Panel to uninstall update KB2506146. To find it, click &lt;b&gt;View installed updates&lt;/b&gt; and then search for KB2506146.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To complete the installation, restart the computer.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sharath Gopalappa [MSFT]&lt;br /&gt;Software Design Engineer - Windows PowerShell&lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10286675" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-28-66-75/WMF3BetaPrerequisiteCheck.ps1" length="11805" type="application/octet-stream" /></item></channel></rss>