<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Windows PowerShell Blog</title><subtitle type="html">Automating the world one-liner at a time.
&lt;table border=0 width=100%&gt;&lt;tr&gt;&lt;td align=right&gt;&lt;a href='http://blogs.msdn.com/powershell/pages/download-windows-powershell.aspx'&gt;&lt;u&gt;Click Here&lt;/u&gt;&lt;/a&gt; to Download PowerShell&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</subtitle><id>http://blogs.msdn.com/powershell/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/powershell/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-10-17T22:30:48Z</updated><entry><title>New-Object PSObject –Property [HashTable]</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/12/05/new-object-psobject-property-hashtable.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/12/05/new-object-psobject-property-hashtable.aspx</id><published>2009-12-05T04:30:25Z</published><updated>2009-12-05T04:30:25Z</updated><content type="html">&lt;pre class="PowerShellColorizedScript"&gt;Let me start of by suggesting you take a few minutes and read Laerte Junior’s excellent blog &lt;br /&gt;entry &lt;a href="http://www.simple-talk.com/content/article.aspx?article=874"&gt;Exceptional PowerShell DBA Pt1 Orphaned Users&lt;/a&gt;.  Laerte does a great job describing the &lt;br /&gt;scenario, the approach he took to solving it and then he included the scripts!  Really good&lt;br /&gt;stuff Laerte! &lt;/pre&gt;

&lt;pre class="PowerShellColorizedScript"&gt;When I looked at Laerte’s code, I recognized one of my least favorite PowerShell V1isms:&lt;/pre&gt;

&lt;pre class="PowerShellColorizedScript"&gt;		&lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;PSObject&lt;/span&gt;                                       
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;LineNumber&lt;/span&gt;       &lt;span style="color: #ff4500"&gt;$LineNumber&lt;/span&gt;                 
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Date&lt;/span&gt;             &lt;span style="color: #ff4500"&gt;$TodayDate&lt;/span&gt;              
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;ServerName&lt;/span&gt;       &lt;span style="color: #ff4500"&gt;$svr&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;DatabaseName&lt;/span&gt;     &lt;span style="color: #ff4500"&gt;$Database&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;UserName&lt;/span&gt;         &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;name&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;CreateDate&lt;/span&gt;       &lt;span style="color: #ff4500"&gt;$CreateDate&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;DateLastModified&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$DateLastModified&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;AsymMetricKey&lt;/span&gt;    &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;AsymMetricKey&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;DefaultSchema&lt;/span&gt;    &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;DefaultSchema&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;HasDBAccess&lt;/span&gt;      &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;HasDBAccess&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;ID&lt;/span&gt;               &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;ID&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;LoginType&lt;/span&gt;        &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;LoginType&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Login&lt;/span&gt;            &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;Login&lt;/span&gt;            
               &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt; &lt;span style="color: #0000ff"&gt;add-member&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Noteproperty&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Orphan&lt;/span&gt;           &lt;span style="color: #000000"&gt;(&lt;/span&gt;&lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;Login&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;-eq&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000"&gt;)&lt;/span&gt;            
                                &lt;/pre&gt;

&lt;p&gt;Gosh that is a horrible looking thing.&amp;#160; This is one of the things we fixed with PowerShell V2 so you take a few minutes to 
  &lt;br /&gt;learn this so you never have to do that mess again.&amp;#160; Let’s get some help: 

  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Courier New"&gt;PS&amp;gt; G&lt;strong&gt;et-Help New-Object -Parameter Property&lt;/strong&gt; &lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Courier New"&gt;-Property &amp;lt;hashtable&amp;gt; 
    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Sets property values and invokes methods of the new object. 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Enter a hash table in which the keys are the names of properties or methods and the values are property value 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; s or method arguments. New-Object creates the object and sets each property value and invokes each method in 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; the order that they appear in the hash table. 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; If the new object is derived from the PSObject class, and you specify a property that does not exist on the o 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; bject, New-Object adds the specified property to the object as a NoteProperty. If the object is not a PSObjec 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; t, the command generates a non-terminating error. 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Required?&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; false 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Position?&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; named 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Default value&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;br /&gt;&amp;#160;&amp;#160;&amp;#160; Accept pipeline input?&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; false 

    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Accept wildcard characters?&amp;#160; false&lt;/font&gt; &lt;/p&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;Thats right – you can now specify a hashtable and we’ll set these as NoteProperties on an object.&amp;#160; What that means is that you can now write code like this: &lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="PowerShellColorizedScript"&gt;&lt;span style="color: #ff4500"&gt;    $Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;PSObject&lt;/span&gt; &lt;span style="color: #000080"&gt;-Property&lt;/span&gt; &lt;span style="color: #000000"&gt;@{&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;LineNumber&lt;/span&gt;       &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$LineNumber&lt;/span&gt;                 
        &lt;span style="color: #000000"&gt;Date&lt;/span&gt;             &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$TodayDate&lt;/span&gt;              
        &lt;span style="color: #000000"&gt;ServerName&lt;/span&gt;       &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$svr&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;DatabaseName&lt;/span&gt;     &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$Database&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;UserName&lt;/span&gt;         &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;name&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;CreateDate&lt;/span&gt;       &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$CreateDate&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;DateLastModified&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$DateLastModified&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;AsymMetricKey&lt;/span&gt;    &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;AsymMetricKey&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;DefaultSchema&lt;/span&gt;    &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;DefaultSchema&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;HasDBAccess&lt;/span&gt;      &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;HasDBAccess&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;ID&lt;/span&gt;               &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;ID&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;LoginType&lt;/span&gt;        &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;LoginType&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;Login&lt;/span&gt;            &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;Login&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;Orphan&lt;/span&gt;           &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #000000"&gt;(&lt;/span&gt;&lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;Login&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;-eq&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000"&gt;)&lt;/span&gt;            
    &lt;span style="color: #000000"&gt;}&lt;/span&gt;                           
                                    &lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;or if you prefer:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="PowerShellColorizedScript"&gt;&lt;span style="color: #ff4500"&gt;   $hash&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #000000"&gt;@{&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;LineNumber&lt;/span&gt;       &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$LineNumber&lt;/span&gt;                 
        &lt;span style="color: #000000"&gt;Date&lt;/span&gt;             &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$TodayDate&lt;/span&gt;              
        &lt;span style="color: #000000"&gt;ServerName&lt;/span&gt;       &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$svr&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;DatabaseName&lt;/span&gt;     &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$Database&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;UserName&lt;/span&gt;         &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;name&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;CreateDate&lt;/span&gt;       &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$CreateDate&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;DateLastModified&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$DateLastModified&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;AsymMetricKey&lt;/span&gt;    &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;AsymMetricKey&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;DefaultSchema&lt;/span&gt;    &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;DefaultSchema&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;HasDBAccess&lt;/span&gt;      &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;HasDBAccess&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;ID&lt;/span&gt;               &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;ID&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;LoginType&lt;/span&gt;        &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;LoginType&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;Login&lt;/span&gt;            &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;Login&lt;/span&gt;            
        &lt;span style="color: #000000"&gt;Orphan&lt;/span&gt;           &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #000000"&gt;(&lt;/span&gt;&lt;span style="color: #ff4500"&gt;$user&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;.&lt;/span&gt;&lt;span style="color: #000000"&gt;Login&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;-eq&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000"&gt;)&lt;/span&gt;            
    &lt;span style="color: #000000"&gt;}&lt;/span&gt;                           
                                    
    &lt;span style="color: #ff4500"&gt;$Object&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;PSObject&lt;/span&gt; &lt;span style="color: #000080"&gt;-Property&lt;/span&gt; &lt;span style="color: #ff4500"&gt;$hash&lt;/span&gt;            &lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;This is SO much better than V1 – be sure to use it and to tell all your friends about it as well!&amp;#160; &lt;/p&gt;

&lt;p&gt;Experiment!&amp;#160; Enjoy!&amp;#160; Engage! &lt;/p&gt;

&lt;p&gt;Jeffrey Snover [MSFT] 
  &lt;br /&gt;Distinguished Engineer 

  &lt;br /&gt;Visit the Windows PowerShell Team blog at:&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt; 

  &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at:&amp;#160; &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932888" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>You Don’t Have to Be An Administrator to Run Remote PowerShell Commands</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/23/you-don-t-have-to-be-an-administrator-to-run-remote-powershell-commands.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/23/you-don-t-have-to-be-an-administrator-to-run-remote-powershell-commands.aspx</id><published>2009-11-23T00:52:02Z</published><updated>2009-11-23T00:52:02Z</updated><content type="html">&lt;p&gt;I was just read blog entry which complained about having to have administrative access to execute PowerShell commands against a remote server.&amp;#160; This is not the case.&lt;/p&gt;  &lt;p&gt;We are “&lt;em&gt;secure by default&lt;/em&gt;” which means that if you want to do something that exposes a security risk to your machines, you have to make a conscious decision to do so.&amp;#160; We are secure by default so that you can feel confident in putting PowerShell on all your machines.&amp;#160; Your risks are a function of the decisions you make after&amp;#160; you install PowerShell and we’ll educate you about the risks and benefits of those decisions.&amp;#160; (Run “Get-Help about_Execution_Policies” to see a great example of that.)&lt;/p&gt;  &lt;p&gt;That is why remoting is turned off by default and you have to run Enable-PSRemoting to turn it on.&amp;#160; &lt;/p&gt;  &lt;p&gt;When you do this, we create the default PSSessionConfiguration called Microsoft.PowerShell with a SDDL which only allows people with administrative rights to execute remote commands on that machine.&amp;#160; You can see that by the following command:&lt;/p&gt;  &lt;p&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;PS&amp;gt; Get-PSSessionConfiguration |fl * &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;Name&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; : microsoft.powershell     &lt;br /&gt;Filename&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; : %windir%\system32\pwrshplugin.dll      &lt;br /&gt;SDKVersion&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : 1      &lt;br /&gt;XmlRenderingType&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : text      &lt;br /&gt;lang&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; : en-US      &lt;br /&gt;PSVersion&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; : 2.0      &lt;br /&gt;ResourceUri&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;a href="http://schemas.microsoft.com/powershell/microsoft.powershell"&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;http://schemas.microsoft.com/powershell/microsoft.powershell&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;SupportsOptions&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : true     &lt;br /&gt;Capability&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : {Shell}      &lt;br /&gt;xmlns&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;a href="http://schemas.microsoft.com/wbem/wsman/1/config/PluginConfiguration"&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;http://schemas.microsoft.com/wbem/wsman/1/config/PluginConfiguration&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;Uri&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;a href="http://schemas.microsoft.com/powershell/Microsoft.PowerShell"&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;http://schemas.microsoft.com/powershell/Microsoft.PowerShell&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;ExactMatch&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : false     &lt;br /&gt;&lt;font color="#ff0000"&gt;SecurityDescriptorSddl : O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)       &lt;br /&gt;Permission&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : BUILTIN\Administrators AccessAllowed&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you decide you want to allow others, what you do is run the command:   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;PS&amp;gt; &lt;strong&gt; Set-PSSessionConfiguration -Name Microsoft.PowerShell -showSecurityDescriptorUI &lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;Confirm     &lt;br /&gt;Are you sure you want to perform this action?      &lt;br /&gt;Performing operation &amp;quot;Set-PSSessionConfiguration&amp;quot; on Target &amp;quot;Name: Microsoft.PowerShell&amp;quot;.      &lt;br /&gt;[Y] Yes&amp;#160; [A] Yes to All&amp;#160; [N] No&amp;#160; [L] No to All&amp;#160; [S] Suspend&amp;#160; [?] Help (default is &amp;quot;Y&amp;quot;): y&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Notice that this action could have a serious impact on your system so we ask you to confirm that you really want to do this.(In general we assume you know what you are doing and only bring up these nag-messages when we think it is super important that you not sleep walk through this one.&amp;#160; You can always add a –FORCE switch to bypass this message.)&amp;#160; This brings up the following dialog box which allows you to give others the ability to run commands on that machine:   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/powershell/WindowsLiveWriter/YouDontHavetoBeAnAdministratortoRunRemot_ED2C/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/powershell/WindowsLiveWriter/YouDontHavetoBeAnAdministratortoRunRemot_ED2C/image_thumb.png" width="399" height="483" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Experiment!&amp;#160; Enjoy!&amp;#160; Engage! &lt;/p&gt;  &lt;p&gt;Jeffrey Snover [MSFT]   &lt;br /&gt;Distinguished Engineer    &lt;br /&gt;Visit the Windows PowerShell Team blog at:&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt;    &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at:&amp;#160; &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9927053" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>Windows PowerShell and the Windows Management Framework</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/20/windows-powershell-and-the-windows-management-framework.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/20/windows-powershell-and-the-windows-management-framework.aspx</id><published>2009-11-20T00:43:16Z</published><updated>2009-11-20T00:43:16Z</updated><content type="html">&lt;p&gt;There’s been a lot of great excitement that’s accompanied the release of PowerShell V2 and Windows Remote Management (WinRM) – also known as the Windows Management Framework. We’ve also heard the occasional question on whether it’s possible to install them independently.&lt;/p&gt;  &lt;p&gt;When we’ve heard this concern, it is usually focused on security. To be clear, Windows Remote Management (WinRM) has been part of Windows since Vista and Server 2008. It does not listen to network connections by default, and must be explicitly activated. Both have advanced greatly during the release of Windows 7 – most notably by working together to support a rich PowerShell-based remoting experience.&lt;/p&gt;  &lt;p&gt;The Windows Management Framework download (PowerShell + WinRM) simply updates the binaries on non-Win7 machines to bring them up to the same version already included in Windows 7 and Windows Server 2008 R2.&lt;/p&gt;  &lt;p&gt;Investigating this concern further, it usually comes down to concern about increased network attack surface: automatically opening a network port to accept incoming connections. Installing the Windows Management Framework does not do this automatically. “Secure by Default” is the mantra of both our team, and Microsoft as a whole. Enabling PowerShell Remoting is an explicit step that must be run from an elevated prompt. The command fully informs you of the security implications when you do so:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;[C:\Windows\system32]       &lt;br /&gt;PS:101 &amp;gt; Enable-PsRemoting&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;WinRM Quick Configuration&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;Running command &amp;quot;Set-WSManQuickConfig&amp;quot; to enable this machine for remote management through WinRM service.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;This includes:       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; 1. Starting or restarting (if already started) the WinRM service       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; 2. Setting the WinRM service type to auto start       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; 3. Creating a listener to accept requests on any IP address       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; 4. Enabling firewall exception for WS-Management traffic (for http only).&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New"&gt;Do you want to continue?       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;[Y] Yes&amp;#160; [A] Yes to All&amp;#160; [N] No&amp;#160; [L] No to All&amp;#160; [S] Suspend&amp;#160; [?] Help (default is &amp;quot;Y&amp;quot;):&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;While we (and Windows Security, and external security consultants that we hired for analysis and penetration testing) &lt;b&gt;also&lt;/b&gt; believe in the security of our remoting protocol and the attack surface that it exposes, we focused from the start on letting you make that decision independently.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Lee Holmes [MSFT]   &lt;br /&gt;Windows PowerShell Development    &lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9925909" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>PDC09 SVR12 and SVR13 Session Demos</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/19/pdc09-svr12-and-svr13-demos-session-demos.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="183621" href="http://blogs.msdn.com/powershell/attachment/9925010.ashx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/19/pdc09-svr12-and-svr13-demos-session-demos.aspx</id><published>2009-11-19T02:08:00Z</published><updated>2009-11-19T02:08:00Z</updated><content type="html">&lt;P&gt;Attached are the demos from the PDC sessions SVR12 and SVR 13 today. Here are the steps you need to do before you can run them&lt;/P&gt;
&lt;P&gt;1. Unzip the files and run setup\setup.ps1. This will configure user accounts and initialize some files required&lt;/P&gt;
&lt;P&gt;2. Change computers.dat in service\roles\. Set it to the computers that you want to connect to&lt;/P&gt;
&lt;P&gt;3. Edit Impersonation\Get-DelegationCredential.ps1 under each folder - Inventory, Service and Employee (Please Note: This script is intended only for demo purposes and is not recommended to be copied for production&lt;/P&gt;
&lt;P&gt;4. Set the paths in app.xaml.cs in each of the visual studio projects - EasyGUI and RemoteUI&lt;/P&gt;
&lt;P&gt;Once the above are done then you are all set. Play around with them and have fun !!!&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Nana&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;Narayanan Lakshmanan [MSFT] &lt;BR&gt;Developer&lt;BR&gt;Visit the Windows PowerShell Team blog at:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://blogs.msdn.com/PowerShell" mce_href="http://blogs.msdn.com/PowerShell"&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;http://blogs.msdn.com/PowerShell&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt; &lt;BR&gt;Visit the Windows PowerShell ScriptCenter at:&amp;nbsp; &lt;A href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9925010" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>I Can Do That With 1 Line of PowerShell: Installed Software</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/15/i-can-do-that-with-1-line-of-powershell-installed-software.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/15/i-can-do-that-with-1-line-of-powershell-installed-software.aspx</id><published>2009-11-15T17:42:37Z</published><updated>2009-11-15T17:42:37Z</updated><content type="html">&lt;p&gt;Ying Li has a cool PowerShell Script to list installed Software on a local computer &lt;a href="http://myitforum.com/cs2/blogs/yli628/archive/2008/01/16/powershell-script-to-list-installed-software-on-local-computer.aspx"&gt;HERE&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;When I looked at it and thought to myself, I can do that with 1 line (if I cheat a little).&amp;#160; Here it is:&lt;/p&gt;  &lt;p&gt;&lt;font color="#000080" size="2" face="Courier New"&gt;PS&amp;gt; gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |Select DisplayName, DisplayVersion, Publisher, InstallDate, HelpLink, UninstallString |ogv&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is what&amp;#160; you get for that 1 line of code:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/powershell/WindowsLiveWriter/ICanDoThatWith1LineofPowerShellInstalled_8872/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/powershell/WindowsLiveWriter/ICanDoThatWith1LineofPowerShellInstalled_8872/image_thumb.png" width="875" height="410" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I cheated by using OGV&amp;#160; (Out-GridView).&amp;#160; Ying used Excel and the output is nicer.&amp;#160; But when you only want to spend a single line…&amp;#160; :-)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Experiment!&amp;#160; Enjoy!&amp;#160; Engage! &lt;/p&gt;  &lt;p&gt;Jeffrey Snover [MSFT]   &lt;br /&gt;Distinguished Engineer    &lt;br /&gt;Visit the Windows PowerShell Team blog at:&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt;    &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at:&amp;#160; &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9922651" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>SRV312 TechEd Slides</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/12/srv312-teched-slides.aspx" /><link rel="enclosure" type="application/vnd.openxmlformats-officedocument.pres" length="2129641" href="http://blogs.msdn.com/powershell/attachment/9921338.ashx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/12/srv312-teched-slides.aspx</id><published>2009-11-12T13:57:00Z</published><updated>2009-11-12T13:57:00Z</updated><content type="html">&lt;P&gt;I just gave the talk, "”Server Management Improvements and Solutions for Windows Server 2008 R2”.&amp;nbsp; It went over rather well.&amp;nbsp; Attached are the slides.&amp;nbsp; I will try to get you the demos but that will be difficult and will take some time.&lt;/P&gt;
&lt;P&gt;Enjoy! &lt;/P&gt;
&lt;P&gt;Jeffrey Snover [MSFT] &lt;BR&gt;Distinguished Engineer &lt;BR&gt;Visit the Windows PowerShell Team blog at:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://blogs.msdn.com/PowerShell" mce_href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/A&gt; &lt;BR&gt;Visit the Windows PowerShell ScriptCenter at:&amp;nbsp; &lt;A href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921338" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>Windows Server 2008 R2 Rocks!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/09/windows-server-2008-r2-rocks.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/09/windows-server-2008-r2-rocks.aspx</id><published>2009-11-09T16:05:15Z</published><updated>2009-11-09T16:05:15Z</updated><content type="html">&lt;p&gt;One of the things I like to say is that, “Microsoft is incapable of sustained error”.&amp;#160; By that I mean that Microsoft is an intensely self-conscious culture, fearless about confronting shortcomings and&amp;#160; constantly looking for ways to do things better.&amp;#160; We beat ourselves up pretty brutally about the shortcomings of Vista and committed ourselves to doing better going forward.&amp;#160; This is one of the reasons why Windows Server 2008 was such a good release.&amp;#160; We didn’t stop there, we raised the bar for Windows 7 and Windows Server 2008 R2.&lt;/p&gt;  &lt;p&gt;Part of that was the product itself.&amp;#160; Anyone that uses either of these products can see that immediately.&amp;#160; These are solid, high quality products.&amp;#160; We also raised the bar and teaching people about the release.&amp;#160; &lt;/p&gt;  &lt;p&gt;This morning, MSDN’s Channel9 opened up a new site for learning about WS08/R2 &lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/"&gt;HERE&lt;/a&gt;.&amp;#160; This site has lessons and short training videos for the following WS08/R2 topics:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Designed for Performance&lt;/li&gt;    &lt;li&gt;Designed for Efficiency&lt;/li&gt;    &lt;li&gt;Server Core .NET Application Server&lt;/li&gt;    &lt;li&gt;The Extensible Web Platform&lt;/li&gt;    &lt;li&gt;Extreme Web Services&lt;/li&gt;    &lt;li&gt;The Extensible File Classification Infrastructure&lt;/li&gt;    &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/"&gt;Windows PowerShell is Powerful Automation!&lt;/a&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/PowerShellV2forDevelopers/"&gt;Powershell V2 for Developers&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/PowerShell/"&gt;Windows PowerShell is Powerful Automation!&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/VPowerShell2/"&gt;Variables, Types, and Operators&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/VPowerShell3/"&gt;Array’s Conditionals, Collections, and Loops&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/VPowerShell4/"&gt;Create Object Cmdlets&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/VPowerShell5/"&gt;Remote Sessions&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://channel9.msdn.com/learn/courses/WindowsServer2008R2/PowerShell/VPowerShell6"&gt;Advanced Remote Sessions&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;VHD and Hyper-V APIs Enable Creative New Solutions&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Much of this content if focused on developers but admin/It Pro scripters will find PowerShell section useful and appropriate.&lt;/p&gt;  &lt;p&gt;Experiment!&amp;#160; Enjoy!&amp;#160; Engage! &lt;/p&gt;  &lt;p&gt;Jeffrey Snover [MSFT]   &lt;br /&gt;Distinguished Engineer    &lt;br /&gt;Visit the Windows PowerShell Team blog at:&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt;    &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at:&amp;#160; &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9919585" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>PowerPack Challenge</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/05/powerpack-challenge.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/05/powerpack-challenge.aspx</id><published>2009-11-05T16:46:00Z</published><updated>2009-11-05T16:46:00Z</updated><content type="html">&lt;P&gt;&lt;SPAN class=powerpackchallengeHeader&gt;&lt;STRONG&gt;Quest Software’s PowerPack Challenge’09&lt;/STRONG&gt;&lt;/SPAN&gt; is on... calling all script warriors to show their skills.&lt;/P&gt;
&lt;P&gt;See the details here - &lt;A href="http://powergui.org/powerpackchallenge.jspa"&gt;http://powergui.org/powerpackchallenge.jspa&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Happy Scritping&lt;/P&gt;
&lt;P&gt;Osama Sajid, Program Manager&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918071" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author><category term="Quest Software PowerPack Challenge" scheme="http://blogs.msdn.com/powershell/archive/tags/Quest+Software+PowerPack+Challenge/default.aspx" /></entry><entry><title>Why is Get-ChildItem so Slow?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/04/why-is-get-childitem-so-slow.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/04/why-is-get-childitem-so-slow.aspx</id><published>2009-11-04T20:52:55Z</published><updated>2009-11-04T20:52:55Z</updated><content type="html">&lt;p&gt;We get this question fairly frequently when it comes to slow network connections.&lt;/p&gt;  &lt;p&gt;The performance of directory listings (especially on a laggy network) are limited by the .NET APIs we call to retrieve the directory information. There are two limitations to the current set of APIs:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Forced Retrieval of Attributes&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When we do a directory listing, we show the standard attributes of the file or directory: Mode, LastWriteTime, Length, and Name. The core Windows API is highly optimized for this basic scenario, and returns these attributes by default along with the rest of the file information. However, the .NET Framework doesn’t take advantage of this data, and instead goes back to the network location to ask for all of the file attributes. This chatty behaviour adds a handful of network round trips for each file or directory, making the directory listing many times slower: hundreds or thousands of times slower in many cases. The Framework team addressed this as &lt;a href="http://blogs.msdn.com/bclteam/archive/2008/11/04/what-s-new-in-the-bcl-in-net-4-0-justin-van-patten.aspx"&gt;part of .NET 4.0&lt;/a&gt;, and you’ll see the benefits of this new feature as soon as we are able to adopt it.&lt;/p&gt;  &lt;p&gt;In version two, even without the benefit of the new .NET API, though, you’ll see a huge improvement in wildcarded directory listings (both local and remote.)&lt;/p&gt;  &lt;p&gt;As a background, PowerShell wildcards are different than straight cmd.exe wildcards. For example, PowerShell wildcards do not match the 8.3 short file name, while the native filesystem filtering (exposed by cmd.exe wildcards) do. PowerShell’s wildcards support character ranges, while the native file system filtering support does not. Because of this, PowerShell wildcard processing happens AFTER we’ve retrieved all of the files. &lt;/p&gt;  &lt;p&gt;This comes at a cost, however. Native file system filtering (as exposed by the &lt;font face="Courier New"&gt;–Filter&lt;/font&gt; parameter) is MUCH faster, as its processing is wired into the Windows file system.&lt;/p&gt;  &lt;p&gt;In version two, we did a bunch of work to resolve this strain. When you provide a PowerShell wildcard, we convert as much of it as possible to a native filesystem filter, and then apply our wildcarding logic to the much smaller set of results. You’ve probably noticed this most in tab completion, but it makes huge improvements in regular wildcarded directory listings. Especially remote ones. Since the native filtering is processed by the &lt;em&gt;remote&lt;/em&gt; file system, we don’t need to suffer the performance penalty of accessing attributes of files that you ultimately don’t care about anyways. In version one, you can work around the issue by specifying the &lt;font face="courier new"&gt;–Filter&lt;/font&gt; parameter directly. If this still doesn’t provide the speed you need, you can call “&lt;font face="Courier New"&gt;cmd.exe /c dir&lt;/font&gt;”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Lack of Enumeration API&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This issue raises itself for directory listings that contain many files. The DirectoryInfo.GetFiles() method returns an array. When creating that result list, the .NET Framework does many re-allocations (and copies) of that array, causing an exponential performance degradation:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="GetChildItemPerf" border="0" alt="GetChildItemPerf" src="http://blogs.msdn.com/blogfiles/powershell/WindowsLiveWriter/WhyisGetChildItemsoSlow_97A0/GetChildItemPerf_1.jpg" width="570" height="358" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This, too, has been resolved in the .NET 4.0 updates, by offering an API that lets you enumerate through a directory result, rather than retrieve them all at once. If you are running into these limitations, you can again apply a wildcarding approach. If this still doesn’t provide the speed you need, you can call “&lt;font face="Courier New"&gt;cmd.exe /c &amp;lt;command&amp;gt;&lt;/font&gt;”.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why Don’t We Fix It?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Since cmd.exe isn’t impacted by these issues, why don’t we just do the same thing and call into the core Windows APIs directly? The reason is twofold:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;A core tenet of PowerShell is providing access to the REAL underlying .NET objects. If we implemented the semantics ourselves, we’d have to return new types of objects – something like PSFileInfo and PSDirectoryInfo. V1 scripts (or downstream cmdlets) that expect the REAL underlying .NET objects would fail to work. While we could add a new switch (&lt;font face="Courier New"&gt;-Raw&lt;/font&gt;?), users would still have to change their scripts to support it. In that case, they might as well use the existing cmd /c workaround.&lt;/li&gt;    &lt;li&gt;This issue is ultimately transient. While it’s annoying to drag out over a few years, it will ultimately come and go without users having to change their behaviour. One day, you’ll install a build and the issues will just magically be gone.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Again, thanks for your continuing feedback. That’s what ultimately helped us discover the issue and make sure the right people knew about it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Lee Holmes [MSFT]   &lt;br /&gt;Windows PowerShell Development    &lt;br /&gt;Microsoft Corporation&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9917540" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>Workaround for Add-Member on plain .Net objects</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/11/03/workaround-for-add-member-on-plain-net-objects.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/11/03/workaround-for-add-member-on-plain-net-objects.aspx</id><published>2009-11-03T23:57:22Z</published><updated>2009-11-03T23:57:22Z</updated><content type="html">&lt;h3&gt;Introduction&lt;/h3&gt;  &lt;p&gt;While I was fixing bugs, I came across an interesting bug (&lt;a href="https://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=382818"&gt;https://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=382818&lt;/a&gt;) that seemed to have a very simple fix upon first glance. However, after doing some more research, I found out that it was actually very tricky to fix the root cause. If you do the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;$table = @{ key1=&amp;quot;val1&amp;quot;; key2=&amp;quot;val2&amp;quot; }     &lt;br /&gt;Add-Member -in $table -MemberType NoteProperty -Name test -Value testValue&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now if you pipe $table to Get-Member you will notice that the test property is missing. No matter how many times you repeat the same Add-Member operation, $table seems to be totally unaffected. However, if you access the test property or even a nonexistent property before you use Add-Member, the command will behave correctly.&lt;/p&gt;  &lt;h3&gt;Why is this happening?&lt;/h3&gt;  &lt;p&gt;In PowerShell, we create .Net objects as System.Object as opposed to System.Management.Automation.PSObject for performance reasons. This is because every time an object is converted from System.Object to PSObject, PowerShell has to build the metadata information by reflecting on the .Net object. Doing so can introduce unnecessary overhead since not all operations require PSObjects. When you do something with it (i.e. property access), it becomes a PSObject. However, when you pass a variable ($table) bound to an Object to a cmdlet such as Add-Member, the cmdlet internally converts the bound object into a PSObject. This effectively creates a copy of the original object and anything done to the PSObject is not reflected on the input object.&lt;/p&gt;  &lt;h3&gt;How can we work around it?&lt;/h3&gt;  &lt;p&gt;We are hoping to fix the root cause in the next release. However, the workaround is actually quite simple. Since Add-Member is able to emit the modified object if the –PassThru flag is specified, all you have to do is assigned the object back to your initial variable.&lt;/p&gt;  &lt;p&gt;$table = Add-Member -in $table NoteProperty Test &amp;quot;Test property&amp;quot; –PassThru&lt;/p&gt;  &lt;p&gt;Tianjie (James) Wei [MSFT]   &lt;br /&gt;Software Design Engineer    &lt;br /&gt;Windows PowerShell Team&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9917057" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>Quick, Dirty, Super-Useful Scripting</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/10/31/quick-dirty-super-useful-scripting.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/10/31/quick-dirty-super-useful-scripting.aspx</id><published>2009-10-31T19:28:00Z</published><updated>2009-10-31T19:28:00Z</updated><content type="html">&lt;P&gt;Last weekend I installed the super-awesome W7 Ultimate on all the machines at home.&amp;nbsp; This weekend I decided to install the &lt;A href="http://www.microsoft.com/windows/virtual-pc/download.aspx" mce_href="http://www.microsoft.com/windows/virtual-pc/download.aspx"&gt;XP Virtual mode download&lt;/A&gt;.&amp;nbsp; I started to do this and noticed that it was 500MB.&amp;nbsp; That is large and is going to take a long time FOR EACH PC I have.&amp;nbsp; One of the reasons I got the Ultimate SKU is that it has &lt;A href="http://technet.microsoft.com/en-us/network/dd425028.aspx" mce_href="http://technet.microsoft.com/en-us/network/dd425028.aspx"&gt;BranchCache&lt;/A&gt;.&amp;nbsp; This is EXACTLY what Branchcache was designed to do.&amp;nbsp; One PC downloads something and puts it into a distributed cache and then when the other PCs go to download it, they get it from their peers instead of from the internet (given the way my son reacts when my downloads affects the network and&amp;nbsp; his ability to kill Nazi Zombies, I’m motivated to minimize the usage of the network :-) ).&lt;/P&gt;
&lt;P&gt;That sounds great but the Branchcache is not enabled by default so you have to set it up.&amp;nbsp; I was doing this and it was a pain in the butt so I decided to experiment with a quick and dirty script and I LOVE the results so I thought I would share.&lt;/P&gt;
&lt;P&gt;The issue is that they way you configure Branchcache is with NETSH.&amp;nbsp; The problem with that is that NETSH isn’t remotable.&amp;nbsp; I was going back and forth between machines trying things out.&amp;nbsp; I gave myself a dopeslap and I realized what I was doing and established a remote PowerShell session to the machines.&amp;nbsp; For a while I was doing Enter-PSSession which gives you an interactive session to the remote machine.&amp;nbsp; That was great but I have more than one machine so I either had to switch machines or have a couple of windows open.&amp;nbsp; Then I decided I would use Invoke-Command.&amp;nbsp; I created a remote connection to all the machines and then collected them in a variable $s and used ICM.&lt;/P&gt;
&lt;P&gt;PS&amp;gt; $s = GSN &lt;BR&gt;PS&amp;gt; icm $s {netsh branchcache show localcache}&lt;/P&gt;
&lt;P&gt;That worked great but it was a little clumsy to work with so I decided to write a quick-n-dirty function to make my life better. &lt;/P&gt;
&lt;P&gt;function b { icm $s -ScriptBlock $([scriptblock]::create("netsh branchcache $args "))}&lt;/P&gt;
&lt;P&gt;Notice that I’m not using VERB-NOUN.&amp;nbsp; Why should I?&amp;nbsp; I’m after FAST (minimal typing) and this is a throw away function.&amp;nbsp; “B” is perfect.&lt;/P&gt;
&lt;P&gt;Notice that I didn’t declare parameters.&amp;nbsp; Why should I?&amp;nbsp; I’m going quick.&amp;nbsp; I need it to work but I don’t need it to be formal.&lt;/P&gt;
&lt;P&gt;Notice that I use positional parameters and aliases?&amp;nbsp; Why not?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Now what I’m able to do is:&lt;/P&gt;
&lt;P&gt;PS&amp;gt; b show localcache &lt;BR&gt;PS&amp;gt; b set service mode=DISTRIBUTED&lt;/P&gt;
&lt;P&gt;&amp;lt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;&amp;gt;&lt;BR&gt;&lt;EM&gt;I realized from the comments that I didn't deliver the punchline.&amp;nbsp; The WHOLE point was that the command is going to run on ALL the machines!&amp;nbsp; THAT's the crazy wonderful part of it.&lt;BR&gt;&lt;/EM&gt;&amp;lt;/&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;I haven’t got Branchcache working yet but I’m am zooming and having a blast.&amp;nbsp;&amp;nbsp; We spend a lot of time talking about best practices and formal scripting.&amp;nbsp; That is all super great and super important but there is NOTHING wrong with quick-n-dirty scripting for &lt;STRONG&gt;adhoc&lt;/STRONG&gt; functions.&amp;nbsp; The fact that we designed it so that you can do both with PowerShell is a source of great pride.&lt;/P&gt;
&lt;P&gt;GOD I LOVE POWERSHELL!&lt;/P&gt;
&lt;P&gt;Experiment!&amp;nbsp; Enjoy!&amp;nbsp; Engage! &lt;/P&gt;
&lt;P&gt;Jeffrey Snover [MSFT] &lt;BR&gt;Distinguished Engineer &lt;BR&gt;Visit the Windows PowerShell Team blog at:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://blogs.msdn.com/PowerShell" mce_href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/A&gt; &lt;BR&gt;Visit the Windows PowerShell ScriptCenter at:&amp;nbsp; &lt;A href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9915707" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>Sending Automated emails with Send-MailMessage, ConvertTo-HTML, and the PowerShellPack’s TaskScheduler module</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/10/30/sending-automated-emails-with-send-mailmessage-convertto-html-and-the-powershellpack-s-taskscheduler-module.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/10/30/sending-automated-emails-with-send-mailmessage-convertto-html-and-the-powershellpack-s-taskscheduler-module.aspx</id><published>2009-10-30T19:32:59Z</published><updated>2009-10-30T19:32:59Z</updated><content type="html">&lt;p&gt;On October 15th I released a large collection of scripts called the &lt;a href="http://code.msdn.microsoft.com/PowerShellPack"&gt;PowerShellPack&lt;/a&gt;.&amp;#160; The PowerShellPack has tons of PowerShell V2 scripts that can be used to do all sorts of fun and practical things.&amp;#160; Today, we’ll show how to use a module in the PowerShell Pack to schedule sending a daily automated email with information about the installed programs on a given system.&lt;/p&gt;  &lt;p&gt;Turning the output of a PowerShell script into an automated email is a snap in PowerShell V2, thanks to a nifty new cmdlet called Send-MailMessage.&amp;#160; Send-MailMessage sends out emails with the credentials of the current user (or an arbitrary user) and an SMTP server.&amp;#160; Send-MailMessage can send HTML emails by using the –BodyAsHtml switch, and ConvertTo-HTML can take the output of a cmdlet and turn it into an HTML chunk.&amp;#160; If the email needs some introduction and a signature, you can always use ConvertTo-HTML’s new –PreContent and –PostContent parameters.&lt;/p&gt;  &lt;p&gt;Here’s a quick chunk of script that will send the email message once.&amp;#160; Notice that instead of having a very long line with a lot of parameters, I keep the parameters to Send-MailMessage in a Hashtable and use Splatting to provide them to Send-MailMessage&lt;/p&gt;  &lt;pre class="PowerShellColorizedScript"&gt;&lt;span style="color: #ff4500"&gt;            $messageParameters&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #000000"&gt;@{&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;Subject&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Installed Program report for $env:ComputerName.$env:USERDNSDOMAIN - $((Get-Date).ToShortDateString())&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;Body&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Get-WmiObject&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Win32_Product&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                    &lt;span style="color: #0000ff"&gt;Select-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Name&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;,&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Version&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;,&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Vendor&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
                    &lt;span style="color: #0000ff"&gt;Sort-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Name&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
                    &lt;span style="color: #0000ff"&gt;ConvertTo-Html&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                    &lt;span style="color: #0000ff"&gt;Out-String&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;From&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Me@MyCompany.com&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;To&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Me@MyCompany.com&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;SmtpServer&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;SmtpHost&amp;quot;&lt;/span&gt;                        
            &lt;span style="color: #000000"&gt;}&lt;/span&gt;                        
            &lt;span style="color: #0000ff"&gt;Send-MailMessage&lt;/span&gt; &lt;span style="color: #ff4500"&gt;@messageParameters&lt;/span&gt; &lt;span style="color: #000080"&gt;-BodyAsHtml&lt;/span&gt;                        &lt;/pre&gt;

&lt;p&gt;Now that we've got that chunk of code down, let's go ahead and make sure that any problems we encounter get put into a file somewhere.&amp;#160; I can do this by setting one of PowerShell’s magic variables $ErrorActionPreference = “Stop”, and adding a try/catch around all of my code: &lt;/p&gt;

&lt;pre class="PowerShellColorizedScript"&gt;&lt;span style="color: #ff4500"&gt;        $ErrorActionPreference&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Stop&amp;quot;&lt;/span&gt;                        
        &lt;span style="color: #00008b"&gt;try&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt;                        
            &lt;span style="color: #ff4500"&gt;$messageParameters&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #000000"&gt;@{&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;Subject&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Installed Program report for $env:ComputerName.$env:USERDNSDOMAIN - $((Get-Date).ToShortDateString())&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;Body&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Get-WmiObject&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Win32_Product&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                    &lt;span style="color: #0000ff"&gt;Select-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Name&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;,&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Version&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;,&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Vendor&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
                    &lt;span style="color: #0000ff"&gt;Sort-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Name&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
                    &lt;span style="color: #0000ff"&gt;ConvertTo-Html&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                    &lt;span style="color: #0000ff"&gt;Out-String&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;From&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Me@MyCompany.com&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;To&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Me@MyCompany.com&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;SmtpServer&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;SmtpHost&amp;quot;&lt;/span&gt;                        
            &lt;span style="color: #000000"&gt;}&lt;/span&gt;                        
            &lt;span style="color: #0000ff"&gt;Send-MailMessage&lt;/span&gt; &lt;span style="color: #ff4500"&gt;@messageParameters&lt;/span&gt; &lt;span style="color: #000080"&gt;-BodyAsHtml&lt;/span&gt;                        
        &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #00008b"&gt;catch&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt;                        
            &lt;span style="color: #ff4500"&gt;$_&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                &lt;span style="color: #0000ff"&gt;Out-File&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;$env:TEMP\ProblemsSendingHotfixReport.log.txt&lt;/span&gt; &lt;span style="color: #000080"&gt;-Append&lt;/span&gt; &lt;span style="color: #000080"&gt;-Width&lt;/span&gt; &lt;span style="color: #800080"&gt;1000&lt;/span&gt;                        
        &lt;span style="color: #000000"&gt;}&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Finally, I’ll just go ahead and use the TaskScheduler module from PowerShellPack to make sure the email arrives every day.&amp;#160; To do this, I’ll need to download the PowerShellPack to the machine I’ll be scheduling the task on.&amp;#160;&amp;#160; Scheduling a task with the PowerShell Pack involves a short pipeline:&amp;#160; Ours will look something like:&lt;/p&gt;

&lt;pre class="PowerShellColorizedScript"&gt;&lt;span style="color: #0000ff"&gt;New-Task&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;            
    &lt;span style="color: #0000ff"&gt;Add-TaskAction&lt;/span&gt; &lt;span style="color: #000080"&gt;-Script&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt;            
        &lt;span style="color: #006400"&gt;# Our Emailer Here&lt;/span&gt;            
    &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;            
    &lt;span style="color: #0000ff"&gt;Add-TaskTrigger&lt;/span&gt; &lt;span style="color: #000080"&gt;-Daily&lt;/span&gt; &lt;span style="color: #000080"&gt;-At&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;9:00 AM&amp;quot;&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
    &lt;span style="color: #0000ff"&gt;Add-TaskTrigger&lt;/span&gt; &lt;span style="color: #000080"&gt;-OnRegistration&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
    &lt;span style="color: #0000ff"&gt;Register-ScheduledTask&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;DailyHotfixReport&amp;quot;&lt;/span&gt;                &lt;/pre&gt;

&lt;p&gt;Piece of cake, right?&amp;#160; In our case, we’re sending an email at 9 AM every day (and when the task is registered) with the output of a simple cmdlet, but I could also use this to run a more complex task, and I can play around with the different trigger types to send the emails whenever I’d like.&lt;/p&gt;

&lt;p&gt;Here’s the full script:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;pre class="PowerShellColorizedScript"&gt;&lt;span style="color: #0000ff"&gt;New-Task&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                        
    &lt;span style="color: #0000ff"&gt;Add-TaskAction&lt;/span&gt; &lt;span style="color: #000080"&gt;-Hidden&lt;/span&gt; &lt;span style="color: #000080"&gt;-Script&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt;                        
        &lt;span style="color: #ff4500"&gt;$ErrorActionPreference&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Stop&amp;quot;&lt;/span&gt;                        
        &lt;span style="color: #00008b"&gt;try&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt;                        
            &lt;span style="color: #ff4500"&gt;$messageParameters&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #000000"&gt;@{&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;Subject&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Installed Program report for $env:ComputerName.$env:USERDNSDOMAIN - $((Get-Date).ToShortDateString())&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;Body&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Get-WmiObject&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Win32_Product&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                    &lt;span style="color: #0000ff"&gt;Select-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Name&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;,&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Version&lt;/span&gt;&lt;span style="color: #a9a9a9"&gt;,&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Vendor&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
                    &lt;span style="color: #0000ff"&gt;Sort-Object&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;Name&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;             
                    &lt;span style="color: #0000ff"&gt;ConvertTo-Html&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                    &lt;span style="color: #0000ff"&gt;Out-String&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;From&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Me@MyCompany.com&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;To&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;Me@MyCompany.com&amp;quot;&lt;/span&gt;                        
                &lt;span style="color: #000000"&gt;SmtpServer&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;=&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;SmtpHost&amp;quot;&lt;/span&gt;                        
            &lt;span style="color: #000000"&gt;}&lt;/span&gt;                        
            &lt;span style="color: #0000ff"&gt;Send-MailMessage&lt;/span&gt; &lt;span style="color: #ff4500"&gt;@messageParameters&lt;/span&gt; &lt;span style="color: #000080"&gt;-BodyAsHtml&lt;/span&gt;                        
        &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #00008b"&gt;catch&lt;/span&gt; &lt;span style="color: #000000"&gt;{&lt;/span&gt;                        
            &lt;span style="color: #ff4500"&gt;$_&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
                &lt;span style="color: #0000ff"&gt;Out-File&lt;/span&gt; &lt;span style="color: #8a2be2"&gt;$env:TEMP\ProblemsSendingHotfixReport.log.txt&lt;/span&gt; &lt;span style="color: #000080"&gt;-Append&lt;/span&gt; &lt;span style="color: #000080"&gt;-Width&lt;/span&gt; &lt;span style="color: #800080"&gt;1000&lt;/span&gt;                        
        &lt;span style="color: #000000"&gt;}&lt;/span&gt;                        
    &lt;span style="color: #000000"&gt;}&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;            
    &lt;span style="color: #0000ff"&gt;Add-TaskTrigger&lt;/span&gt; &lt;span style="color: #000080"&gt;-Daily&lt;/span&gt; &lt;span style="color: #000080"&gt;-At&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;9:00 AM&amp;quot;&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                        
    &lt;span style="color: #0000ff"&gt;Add-TaskTrigger&lt;/span&gt; &lt;span style="color: #000080"&gt;-OnRegistration&lt;/span&gt; &lt;span style="color: #a9a9a9"&gt;|&lt;/span&gt;                         
    &lt;span style="color: #0000ff"&gt;Register-ScheduledTask&lt;/span&gt; &lt;span style="color: #8b0000"&gt;&amp;quot;DailyHotfixReport&amp;quot;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;That wasn't bad, was it?&amp;#160; It took only 24 lines of PowerShell script to create a schedule task that emails me a fairly detailed report of all of the installed programs on the machine. As you can see, PowerShell V2 makes sending automated emails a snap, and the &lt;a href="http://code.msdn.microsoft.com/PowerShellPack"&gt;PowerShellPack&lt;/a&gt; makes scheduling this or any other script on a regular basis a piece of cake.&lt;/p&gt;

&lt;p&gt;Hope this Helps,&lt;/p&gt;

&lt;p&gt;James Brundage [MSFT]&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9915418" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author><category term="PowerShell V2" scheme="http://blogs.msdn.com/powershell/archive/tags/PowerShell+V2/default.aspx" /><category term="PowerShellPack" scheme="http://blogs.msdn.com/powershell/archive/tags/PowerShellPack/default.aspx" /></entry><entry><title>Windows Management Framework is here!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/10/27/windows-management-framework-is-here.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/10/27/windows-management-framework-is-here.aspx</id><published>2009-10-27T18:25:13Z</published><updated>2009-10-27T18:25:13Z</updated><content type="html">&lt;p&gt;Windows Management Framework, which includes Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0, was officially released to the world this morning. By providing a consistent management interface across the various flavors of Windows, we are making our platform that much more attractive to deploy. IT Professionals can now easily manage their Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 machines through PowerShell remoting – that’s a huge win!&lt;/p&gt;  &lt;p&gt;You can download the packages here: &lt;b&gt;&lt;i&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=151321"&gt;http://go.microsoft.com/fwlink/?LinkID=151321&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Lee Holmes [MSFT]&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913618" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>Tonight is the Virtual Launch Party @ PowerScripting Podcast</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/10/22/tonight-is-the-virtual-launch-party-powerscripting-podcast.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/10/22/tonight-is-the-virtual-launch-party-powerscripting-podcast.aspx</id><published>2009-10-22T12:14:47Z</published><updated>2009-10-22T12:14:47Z</updated><content type="html">&lt;p&gt;Tonight is the night!&amp;#160; &lt;/p&gt;  &lt;p&gt;I was super happy when we shipped V1 of PowerShell.&amp;#160; It started the journey.&amp;#160; That said, V2 is the release that we really wanted to release.&amp;#160; &lt;/p&gt;  &lt;p&gt;Today Windows 7 is publicly available and every version has PowerShell V2 in it.&amp;#160; &lt;/p&gt;  &lt;p&gt;Tonight – we party!&lt;/p&gt;  &lt;p&gt;I’ll be cracking a beer with Hal Rottenberg and Jonathan Walz (hosts of the &lt;a href="http://powerscripting.wordpress.com/"&gt;PowerScripting Podcast&lt;/a&gt;) in a PowerShell V2 Virtual Launch Party tonight at 9:30 PM EDT (GMT-4).&amp;#160; &lt;/p&gt;  &lt;p&gt;For more details and info on how to join us go &lt;a href="http://powerscripting.wordpress.com/2009/10/16/powershell-v2-virtual-launch-party/"&gt;HERE&lt;/a&gt;.&amp;#160; I’m looking forward to seeing you.&amp;#160; Note, you can always watch the podcast after the fact but if you join, you can make comments and ask questions in the chat room – lots of fun.&lt;/p&gt;  &lt;p&gt;Jeffrey Snover [MSFT]    &lt;br /&gt;Distinguished Engineer     &lt;br /&gt;Visit the Windows PowerShell Team blog at:&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt;    &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at:&amp;#160; &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911299" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry><entry><title>PowerShell V2 Virtual Launch Party</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/powershell/archive/2009/10/17/powershell-v2-virtual-launch-party.aspx" /><id>http://blogs.msdn.com/powershell/archive/2009/10/17/powershell-v2-virtual-launch-party.aspx</id><published>2009-10-17T21:30:48Z</published><updated>2009-10-17T21:30:48Z</updated><content type="html">&lt;p&gt;I’ll be joining Hal Rottenberg and Jonathan Walz (hosts of the &lt;a href="http://powerscripting.wordpress.com/"&gt;PowerScripting Podcast&lt;/a&gt;) in a PowerShell V2 Virtual Launch Party this Thursday, Oct 22nd, 9:30 PM EDT (GMT-4).&amp;#160; &lt;/p&gt;  &lt;p&gt;For more details and info on how to join us go &lt;a href="http://powerscripting.wordpress.com/2009/10/16/powershell-v2-virtual-launch-party/"&gt;HERE&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Hmmm, I wonder if it is BYOB… :-)&lt;/p&gt;  &lt;p&gt;Experiment!&amp;#160; Enjoy!&amp;#160; Engage! &lt;/p&gt;  &lt;p&gt;Jeffrey Snover [MSFT]   &lt;br /&gt;Distinguished Engineer    &lt;br /&gt;Visit the Windows PowerShell Team blog at:&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://blogs.msdn.com/PowerShell"&gt;http://blogs.msdn.com/PowerShell&lt;/a&gt;    &lt;br /&gt;Visit the Windows PowerShell ScriptCenter at:&amp;#160; &lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9908639" width="1" height="1"&gt;</content><author><name>PowerShellTeam</name><uri>http://blogs.msdn.com/members/PowerShellTeam.aspx</uri></author></entry></feed>