<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Nivot Ink - CTP3</title>
    <link>http://www.nivot.org/</link>
    <description>PowerShell, SharePoint, WCF, WWF, .NET, ASP.NET, Enterprise Computing and babble from Microsoft MVP Oisin Grehan.</description>
    <language>en-us</language>
    <copyright>Oisin Grehan</copyright>
    <lastBuildDate>Wed, 24 Feb 2010 22:38:55 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>oising@gmail.com</managingEditor>
    <webMaster>oising@gmail.com</webMaster>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=2cb1ab35-ec6b-40bb-b917-db1630560e72</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,2cb1ab35-ec6b-40bb-b917-db1630560e72.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,2cb1ab35-ec6b-40bb-b917-db1630560e72.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=2cb1ab35-ec6b-40bb-b917-db1630560e72</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
PowerShell guru and Admin-extraordinare <a href="http://www.jdhitsolutions.com/" target="_blank">Jeff
Hicks</a> asked a great question that many a Windows administrator has probably asked
themselves when working with Hashtables in PowerShell: Why do the key/values come
out in a different order than put in? This is a great question and the answer lies
in computer science theory, particularly computational complexity theory. Rather than
bore you with a <a href="http://en.wikipedia.org/wiki/Big_O_notation" target="_blank"><strong>ton
of nonsense about O(1), O(n)</strong></a> and other <a href="http://en.wikipedia.org/wiki/Hash_table" target="_blank">propeller-head
dribble</a>, I figure I could explain it in terms everyone should be able to understand.
</p>
        <h4>Hashtables, Buckets and HashCodes = Rolodex, Index Cards and Surnames<a href="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerShellWhyarekeysinHashtablessortedra_E213/card-index_2.jpg"><img style="border-right-width: 0px; margin: 15px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="card-index" border="0" alt="card-index" align="right" src="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerShellWhyarekeysinHashtablessortedra_E213/card-index_thumb.jpg" width="130" height="88" /></a></h4>
        <p>
Yes, if the light hasn’t gone on yet, it will soon. Every .NET object includes a method
called GetHashCode. This method returns a number that represents the identity of the
object in a kind of fuzzy way. I say “fuzzy” because the hash code for a given instance
of an object can be different on different platforms (xp, vista, 2003 etc) or on different
bitness (64 vs 32 bit.) This method is used by hashtable to get the “surname” of an
object. Instead of Index Cards, a Hashtable uses “buckets” to separate groups of objects.
Any given Hashcode will naturally fall into a particular bucket as the function (result)
of a high-speed optimized algorithm, much like any given surname naturally falls under
a particular letter of the alphabet. Finally, it should be clear to you that using
index cards [Hashtable buckets] is way faster than flicking through an unsorted folder
[randomized list.]
</p>
        <p>
Just like a Rolodex, the order you add names to it doesn’t dictate the order they
are in as you flip through the cards sequentially, which is analogous to sending a
Hashtable to out-default.
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=2cb1ab35-ec6b-40bb-b917-db1630560e72" />
      </body>
      <title>PowerShell - Why are keys in Hashtables sorted randomly?</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,2cb1ab35-ec6b-40bb-b917-db1630560e72.aspx</guid>
      <link>http://www.nivot.org/2010/02/24/PowerShellWhyAreKeysInHashtablesSortedRandomly.aspx</link>
      <pubDate>Wed, 24 Feb 2010 22:38:55 GMT</pubDate>
      <description>&lt;p&gt;
PowerShell guru and Admin-extraordinare &lt;a href="http://www.jdhitsolutions.com/" target="_blank"&gt;Jeff
Hicks&lt;/a&gt; asked a great question that many a Windows administrator has probably asked
themselves when working with Hashtables in PowerShell: Why do the key/values come
out in a different order than put in? This is a great question and the answer lies
in computer science theory, particularly computational complexity theory. Rather than
bore you with a &lt;a href="http://en.wikipedia.org/wiki/Big_O_notation" target="_blank"&gt;&lt;strong&gt;ton
of nonsense about O(1), O(n)&lt;/strong&gt;&lt;/a&gt; and other &lt;a href="http://en.wikipedia.org/wiki/Hash_table" target="_blank"&gt;propeller-head
dribble&lt;/a&gt;, I figure I could explain it in terms everyone should be able to understand.
&lt;/p&gt;
&lt;h4&gt;Hashtables, Buckets and HashCodes = Rolodex, Index Cards and Surnames&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerShellWhyarekeysinHashtablessortedra_E213/card-index_2.jpg"&gt;&lt;img style="border-right-width: 0px; margin: 15px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="card-index" border="0" alt="card-index" align="right" src="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerShellWhyarekeysinHashtablessortedra_E213/card-index_thumb.jpg" width="130" height="88"&gt;&lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;
Yes, if the light hasn’t gone on yet, it will soon. Every .NET object includes a method
called GetHashCode. This method returns a number that represents the identity of the
object in a kind of fuzzy way. I say “fuzzy” because the hash code for a given instance
of an object can be different on different platforms (xp, vista, 2003 etc) or on different
bitness (64 vs 32 bit.) This method is used by hashtable to get the “surname” of an
object. Instead of Index Cards, a Hashtable uses “buckets” to separate groups of objects.
Any given Hashcode will naturally fall into a particular bucket as the function (result)
of a high-speed optimized algorithm, much like any given surname naturally falls under
a particular letter of the alphabet. Finally, it should be clear to you that using
index cards [Hashtable buckets] is way faster than flicking through an unsorted folder
[randomized list.]
&lt;/p&gt;
&lt;p&gt;
Just like a Rolodex, the order you add names to it doesn’t dictate the order they
are in as you flip through the cards sequentially, which is analogous to sending a
Hashtable to out-default.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=2cb1ab35-ec6b-40bb-b917-db1630560e72" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,2cb1ab35-ec6b-40bb-b917-db1630560e72.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=cd495bea-3b22-4e22-b6cf-4a73a136e298</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,cd495bea-3b22-4e22-b6cf-4a73a136e298.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,cd495bea-3b22-4e22-b6cf-4a73a136e298.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=cd495bea-3b22-4e22-b6cf-4a73a136e298</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>updated 2009/7/20: added link to PSEventing for v1.0 event handling<br />
updated 2009/7/24: added link to Get-Delegate script for v1.0 callbacks</em>
        </p>
        <p>
There have been some nice improvements made in the latest build of <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell</a> with
respect to interop with the "callback” pattern in .NET. What exactly are callbacks
anyway? It’s exactly what it sounds like, pretty much. In .NET there are sometimes
APIs you need to call that expect you to hand them delegates (pointers to methods)
which that API will call some time in the future, usually based on certain conditions
being fulfilled. If that sounds a bit like .NET events, you’d be right. An event is
a much gussied-up callback - it’s just a way of permitting multiple methods to be
invoked in response to some condition.
</p>
        <h4>Synchronous Callbacks in PowerShell v1.0
</h4>
        <p>
In .NET there are two types of callbacks: Asynchronous (non-blocking) and synchronous
(blocking). In PowerShell v1.0, the only callbacks that were catered for were for <a href="http://msdn.microsoft.com/en-us/library/system.eventhandler.aspx" target="_blank">EventHandler
Delegates</a>. This is the method signature that most of the Windows Forms controls
expect to call back to in response to button clicks etc. You may have seen code similar
to:
</p>
        <p>
        </p>
        <pre class="brush: powershell">$button = new-object system.windows.forms.button
$button.add_Click( { $form.Close() } )
</pre>
        <p>
        </p>
        <p>
This works because in PowerShell v1.0, there is specialized support for this kind
of callback to methods with the EventHandler signature, that is to say, methods with
parameters of (object sender, EventArgs e). PowerShell is able to run the ScriptBlock
in response to the button being clicked and will even pass the two arguments to the
scriptblock for you. When the form is shown from a PowerShell script, there is a single
thread that is running the message loop for the application. It is this same thread
that handles running the script. In the PowerShell engine, there is a pool of threads
created at startup, and each of them has its own “Runspace” for running scripts. Because
it is one of the PowerShell threads that is running the application, that same thread
is able to run the ScriptBlocks in its Runspace when called upon to do so. Although
it is in a slightly roundabout way, this is an example of a synchronous callback.
This single application thread is effectively waiting (blocked) for the callback to
occur in response to a button click (in reality, it’s doing other things while waiting,
but it’s still waiting.)
</p>
        <p>
Some rather creative folks, namely one of the primary developers of PowerShell, wrote
a delegate/scriptblock binder in pure script some years ago which you can use to pass
script to a .NET api to be called back to in a synchronous manner.  See: <a href="http://blogs.msdn.com/powershell/archive/2006/07/25/678259.aspx" target="_blank">Creating
arbitrary delegates to ScriptBlocks</a>.
</p>
        <p>
If you want to work with .NET events in version 1.0 of PowerShell, you’ll need an
add-on, like my <a href="http://www.nivot.org/2008/06/06/PSEventing11ForPowerShell10FinalRelease.aspx" target="_blank">PSEventing
Snap-In</a>.
</p>
        <h4>Synchronous Callbacks in PowerShell v2.0
</h4>
        <p>
In the latest and greatest version of PowerShell, v2.0 RC (which comes with the public
Windows 7 RC), synchronous callbacks got a whole lot easier. PowerShell is now able
to deal with pretty much ANY delegate signature, automatically. Lets test this by
using the .NET 3.5 System.Func&lt;T, TResult&gt; delegate. This is a generic delegate
which lets us pass a method to an API expecting a callback to a method which has one
parameters of type T1, and will return type T2. Because it’s generic, we get to pick
which parameters. Lets demo creating a ScriptBlock that will be passed a DateTime
and returns a String:
</p>
        <p>
        </p>
        <pre class="brush: powershell">add-type –assembly system.core # load .net 3.5
$callback = [system.func[datetime, string]] { param($date); "the date is $date" }
$callback.Invoke( [datetime]::now )
# returns
”the date is 2009/07/14 21:50:35”
</pre>
        <p>
        </p>
        <p>
We can even take advantage of PowerShell’s super-versatile parameter binder by passing
it in a string and having it get coerced to DateTime with ne’er a Parse in sight!
</p>
        <p>
        </p>
        <pre class="brush: powershell">$callback.Invoke(“1/1/2009”)
”the date is 2009/01/01 00:00:00”
</pre>
        <p>
        </p>
        <p>
So, what’s the point of all this? Why go to all that trouble? Why not just write a
function? The point is that functions cannot be called by .NET directly. So when would
you need a callback like this in a PowerShell script? 
</p>
        <h5>Calling Web Services with Invalid, Untrusted or Expired SSL Certificates
</h5>
        <p>
The title says it all – sometimes you need to do this. Usually it’s because you’re
working with self-signed, expired or otherwise invalid certificates on a QA or Development
system. The <a href="http://technet.microsoft.com/en-us/library/dd315258.aspx" target="_blank">New-WebServiceProxy</a> Cmdlet
in v2.0 is great for calling Web Services, but it doesn’t have a switch to ignore
invalid certificates. If you were writing .NET code in C# or VB.NET, the way go about
this is to pass a callback method to an API that expects a <a href="http://msdn.microsoft.com/en-ca/library/system.net.security.remotecertificatevalidationcallback.aspx" target="_blank">RemoteCertificateValidationCallback
Delegate</a>. This delegate is designed to point to a method that is passed a handful
of arguments describing the attempted connection, and is expected to return a boolean;
that is to say, true or false. True means “sure, the connection looks fine – go for
it.” A value of False being returned tells .NET to stop the connection before it happens.
</p>
        <p>
The amount of .NET code needed to do this is not a ton, but it’s still a fair handful
of lines. Check out this example here: <a title="http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/" href="http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/">http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/</a></p>
        <p>
Now let’s see how much PowerShell script is needed for this same task:
</p>
        <pre class="brush: powershell">[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }</pre>
        <p>
Bwahahahah! Eat that, Mr. C# coder! Again, PowerShell’s binder comes into play here
and automatically casts our ScriptBlock to a RemoteCertificateValidateCallback delegate
(it’s not really a cast – there is no conversion – it’s a sizeable chunk of code.)
From this point on, any attempts to use the New-WebServiceProxy Cmdlet with dodgy
SSL certificates will succeed without so much as a warning. In fact, pretty much any
other classes, like WebRequest will behave the same way. It’s important to note that
this only affects the current AppDomain, that is to say, the current PowerShell process.
Other processes on the system will continue to stick their nose up at dodgy SSL certs.
Quit PowerShell and restart it -- or set that ServerCertificateValidationCallback
property to $null -- and all is right in the world again. This works as long as you
use one of PowerShell’s threads to do the work of connecting; i.e. don’t use an asynchronous
request. This ensures there is a Runspace available to execute this ScriptBlock.
</p>
        <h5>Converting Synchronous Callbacks into Events
</h5>
        <p>
This is really quite straightforward. Taking the previous example, we would generate
an event inside the scriptblock using <a href="http://technet.microsoft.com/en-us/library/dd315406.aspx" target="_blank">New-Event</a>,
and then bind one or more event handlers using the <a href="http://technet.microsoft.com/en-us/library/dd315290.aspx" target="_blank">Register-EngineEvent</a> Cmdlet:
</p>
        <pre class="brush: powershell">[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {
		new-event -SourceIdentifier SslCheck -MessageData $args &gt; $null
		$true
	}
# dump out arguments to cert validate callback
Register-EngineEvent -SourceIdentifier SslCheck -Action { write-output $args }
</pre>Next
time, we'll get into some meatier stuff. Have fun! 
<p><em>In Part Two: Asynchronous Callbacks in PowerShell v1.0 and v2.0</em></p><img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=cd495bea-3b22-4e22-b6cf-4a73a136e298" /></body>
      <title>PowerShell 2.0 RC: Working with .NET Callbacks – Part 1 - Synchronous</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,cd495bea-3b22-4e22-b6cf-4a73a136e298.aspx</guid>
      <link>http://www.nivot.org/2009/07/18/PowerShell20RCWorkingWithNETCallbacksPart1Synchronous.aspx</link>
      <pubDate>Sat, 18 Jul 2009 08:22:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;updated 2009/7/20: added link to PSEventing for v1.0 event handling&lt;br&gt;
updated 2009/7/24: added link to Get-Delegate script for v1.0 callbacks&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
There have been some nice improvements made in the latest build of &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; with
respect to interop with the "callback” pattern in .NET. What exactly are callbacks
anyway? It’s exactly what it sounds like, pretty much. In .NET there are sometimes
APIs you need to call that expect you to hand them delegates (pointers to methods)
which that API will call some time in the future, usually based on certain conditions
being fulfilled. If that sounds a bit like .NET events, you’d be right. An event is
a much gussied-up callback - it’s just a way of permitting multiple methods to be
invoked in response to some condition.
&lt;/p&gt;
&lt;h4&gt;Synchronous Callbacks in PowerShell v1.0
&lt;/h4&gt;
&lt;p&gt;
In .NET there are two types of callbacks: Asynchronous (non-blocking) and synchronous
(blocking). In PowerShell v1.0, the only callbacks that were catered for were for &lt;a href="http://msdn.microsoft.com/en-us/library/system.eventhandler.aspx" target="_blank"&gt;EventHandler
Delegates&lt;/a&gt;. This is the method signature that most of the Windows Forms controls
expect to call back to in response to button clicks etc. You may have seen code similar
to:
&lt;/p&gt;
&lt;p&gt;
&lt;pre class="brush: powershell"&gt;$button = new-object system.windows.forms.button
$button.add_Click( { $form.Close() } )
&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
This works because in PowerShell v1.0, there is specialized support for this kind
of callback to methods with the EventHandler signature, that is to say, methods with
parameters of (object sender, EventArgs e). PowerShell is able to run the ScriptBlock
in response to the button being clicked and will even pass the two arguments to the
scriptblock for you. When the form is shown from a PowerShell script, there is a single
thread that is running the message loop for the application. It is this same thread
that handles running the script. In the PowerShell engine, there is a pool of threads
created at startup, and each of them has its own “Runspace” for running scripts. Because
it is one of the PowerShell threads that is running the application, that same thread
is able to run the ScriptBlocks in its Runspace when called upon to do so. Although
it is in a slightly roundabout way, this is an example of a synchronous callback.
This single application thread is effectively waiting (blocked) for the callback to
occur in response to a button click (in reality, it’s doing other things while waiting,
but it’s still waiting.)
&lt;/p&gt;
&lt;p&gt;
Some rather creative folks, namely one of the primary developers of PowerShell, wrote
a delegate/scriptblock binder in pure script some years ago which you can use to pass
script to a .NET api to be called back to in a synchronous manner.&amp;nbsp; See: &lt;a href="http://blogs.msdn.com/powershell/archive/2006/07/25/678259.aspx" target="_blank"&gt;Creating
arbitrary delegates to ScriptBlocks&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
If you want to work with .NET events in version 1.0 of PowerShell, you’ll need an
add-on, like my &lt;a href="http://www.nivot.org/2008/06/06/PSEventing11ForPowerShell10FinalRelease.aspx" target="_blank"&gt;PSEventing
Snap-In&lt;/a&gt;.
&lt;/p&gt;
&lt;h4&gt;Synchronous Callbacks in PowerShell v2.0
&lt;/h4&gt;
&lt;p&gt;
In the latest and greatest version of PowerShell, v2.0 RC (which comes with the public
Windows 7 RC), synchronous callbacks got a whole lot easier. PowerShell is now able
to deal with pretty much ANY delegate signature, automatically. Lets test this by
using the .NET 3.5 System.Func&amp;lt;T, TResult&amp;gt; delegate. This is a generic delegate
which lets us pass a method to an API expecting a callback to a method which has one
parameters of type T1, and will return type T2. Because it’s generic, we get to pick
which parameters. Lets demo creating a ScriptBlock that will be passed a DateTime
and returns a String:
&lt;/p&gt;
&lt;p&gt;
&lt;pre class="brush: powershell"&gt;add-type –assembly system.core # load .net 3.5
$callback = [system.func[datetime, string]] { param($date); "the date is $date" }
$callback.Invoke( [datetime]::now )
# returns
”the date is 2009/07/14 21:50:35”
&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
We can even take advantage of PowerShell’s super-versatile parameter binder by passing
it in a string and having it get coerced to DateTime with ne’er a Parse in sight!
&lt;/p&gt;
&lt;p&gt;
&lt;pre class="brush: powershell"&gt;$callback.Invoke(“1/1/2009”)
”the date is 2009/01/01 00:00:00”
&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
So, what’s the point of all this? Why go to all that trouble? Why not just write a
function? The point is that functions cannot be called by .NET directly. So when would
you need a callback like this in a PowerShell script? 
&lt;/p&gt;
&lt;h5&gt;Calling Web Services with Invalid, Untrusted or Expired SSL Certificates
&lt;/h5&gt;
&lt;p&gt;
The title says it all – sometimes you need to do this. Usually it’s because you’re
working with self-signed, expired or otherwise invalid certificates on a QA or Development
system. The &lt;a href="http://technet.microsoft.com/en-us/library/dd315258.aspx" target="_blank"&gt;New-WebServiceProxy&lt;/a&gt; Cmdlet
in v2.0 is great for calling Web Services, but it doesn’t have a switch to ignore
invalid certificates. If you were writing .NET code in C# or VB.NET, the way go about
this is to pass a callback method to an API that expects a &lt;a href="http://msdn.microsoft.com/en-ca/library/system.net.security.remotecertificatevalidationcallback.aspx" target="_blank"&gt;RemoteCertificateValidationCallback
Delegate&lt;/a&gt;. This delegate is designed to point to a method that is passed a handful
of arguments describing the attempted connection, and is expected to return a boolean;
that is to say, true or false. True means “sure, the connection looks fine – go for
it.” A value of False being returned tells .NET to stop the connection before it happens.
&lt;/p&gt;
&lt;p&gt;
The amount of .NET code needed to do this is not a ton, but it’s still a fair handful
of lines. Check out this example here: &lt;a title="http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/" href="http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/"&gt;http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Now let’s see how much PowerShell script is needed for this same task:
&lt;/p&gt;
&lt;pre class="brush: powershell"&gt;[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }&lt;/pre&gt;
&lt;p&gt;
Bwahahahah! Eat that, Mr. C# coder! Again, PowerShell’s binder comes into play here
and automatically casts our ScriptBlock to a RemoteCertificateValidateCallback delegate
(it’s not really a cast – there is no conversion – it’s a sizeable chunk of code.)
From this point on, any attempts to use the New-WebServiceProxy Cmdlet with dodgy
SSL certificates will succeed without so much as a warning. In fact, pretty much any
other classes, like WebRequest will behave the same way. It’s important to note that
this only affects the current AppDomain, that is to say, the current PowerShell process.
Other processes on the system will continue to stick their nose up at dodgy SSL certs.
Quit PowerShell and restart it -- or set that ServerCertificateValidationCallback
property to $null -- and all is right in the world again. This works as long as you
use one of PowerShell’s threads to do the work of connecting; i.e. don’t use an asynchronous
request. This ensures there is a Runspace available to execute this ScriptBlock.
&lt;/p&gt;
&lt;h5&gt;Converting Synchronous Callbacks into Events
&lt;/h5&gt;
&lt;p&gt;
This is really quite straightforward. Taking the previous example, we would generate
an event inside the scriptblock using &lt;a href="http://technet.microsoft.com/en-us/library/dd315406.aspx" target="_blank"&gt;New-Event&lt;/a&gt;,
and then bind one or more event handlers using the &lt;a href="http://technet.microsoft.com/en-us/library/dd315290.aspx" target="_blank"&gt;Register-EngineEvent&lt;/a&gt; Cmdlet:
&lt;/p&gt;
&lt;pre class="brush: powershell"&gt;[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {
		new-event -SourceIdentifier SslCheck -MessageData $args &amp;gt; $null
		$true
	}
# dump out arguments to cert validate callback
Register-EngineEvent -SourceIdentifier SslCheck -Action { write-output $args }
&lt;/pre&gt;Next
time, we'll get into some meatier stuff. Have fun! 
&lt;p&gt;
&lt;em&gt;In Part Two: Asynchronous Callbacks in PowerShell v1.0 and v2.0&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=cd495bea-3b22-4e22-b6cf-4a73a136e298" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,cd495bea-3b22-4e22-b6cf-4a73a136e298.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>Eventing</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
      <category>PSCX</category>
      <category>RC</category>
      <category>Windows 7</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=f789804c-5a35-4d5c-a303-d1a2bdc6bbc0</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,f789804c-5a35-4d5c-a303-d1a2bdc6bbc0.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,f789804c-5a35-4d5c-a303-d1a2bdc6bbc0.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=f789804c-5a35-4d5c-a303-d1a2bdc6bbc0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>
            <strong>update #1 2009/5/23</strong>: noted that local jobs (start-job) no longer
require an elevated shell.</em>
        </p>
        <p>
          <em>
            <strong>update #2 2009/5/28:</strong> ISE object model and shortcut changes; update
for set-psessionconfiguration cmdlet (new screenshot); module changes (highlighted
new manifest member names, binary module can now be root module); </em>
        </p>
        <p>
I’ve been meaning to write this for a while, but it’s been a busy time. This is a
comparison of the significant differences between the standalone CTP3 or Windows 7
Beta version and the version that comes with Win7 RC (6.1.7100.0). For all intents
and purposes, the CTP3 version (6.1.6469.0) is <em>exactly</em> the same as the Windows
7 Beta (6.1.7000.0) version.
</p>
        <p>
This is not going to be an exhaustive list of differences, but I will continue to
update this post as I find more things worth documenting. It should be safe to bookmark
the permalink. One of the nicest things about this release is that it appears that,
without exception, <strong>all built-in Cmdlets have help.</strong> A lot of things
have been cleaned up and fixed in this build, from formatting of text to typos and
minor bugs/glitches. 
</p>
        <h4>Cmdlet Differences
</h4>
        <p>
This is a table listing Cmdlets that have either <span class="changed">changed</span> (navy),
been <span class="added">added</span> (green, underlined) or <span class="removed">removed</span> (red,
strike-through.) Changed Cmdlets have their parameters listed in the second column.
A changed parameter means that its Type has been changed; e.g. it accepts a different
.NET object than before. This is generally nothing to worry about since the corresponding
source of such objects is usually changed to match – typically another Cmdlet. Parameters 
and Cmdlets that have not changed, are not listed. 
</p>
        <p>
          <style type="text/css">
            <!--
        #tbl td
        {
            vertical-align: top;
            font-size: 10pt;
        }
        .added
        {
            color: green;
            text-decoration: underline;
        }
        .removed
        {
            color: red;
            text-decoration: line-through;
        }
        .changed
        {
            color: navy;
        }
        .cmdlet
        {
            font-weight: bold;
            cursor: hand;
        }
        .param
        {
            font-style: italic;
            text-align: left;
        }
        .style1
        {
            width: 19px;
        }
    -->
          </style>
          <table id="tbl" border="1" width="600">
            <thead>
              <tr>
                <th>
Cmdlet</th>
                <th>
Parameters</th>
              </tr>
            </thead>
            <tbody>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Invoke-Command 
</td>
                <td>
                  <table id="pInvoke-Command" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param removed">
NoCompression 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param changed">
Session 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param changed">
SessionOption 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
Remove-Computer 
</td>
                <td>
                  <table id="pRemove-Computer" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
Force 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
Reboot 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ComputerName 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Add-Computer 
</td>
                <td>
                  <table id="pAdd-Computer" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ComputerName 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
Reboot 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="removed cmdlet">
Rename-Computer 
</td>
                <td>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Test-Connection 
</td>
                <td>
                  <table id="pTest-Connection" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
ComputerName 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
Quiet 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
Destination 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
Export-FormatData 
</td>
                <td>
                  <table id="pExport-FormatData" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
 </td>
                        <td class="added param">
Path 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
FilePath 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Receive-Job 
</td>
                <td>
                  <table id="pReceive-Job" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param changed">
Session 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
Start-Job 
</td>
                <td>
                  <table id="pStart-Job" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
InitializationScript 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
RunAs32 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ConfigurationName 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
CertificateThumbprint 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
NoCompression 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Get-Module 
</td>
                <td>
                  <table id="pGet-Module" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
Recurse 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
New-ModuleManifest 
</td>
                <td>
                  <table id="pNew-ModuleManifest" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
ProcessorArchitecture 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
DotNetFrameworkVersion 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
PowerShellHostName 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
PowerShellHostVersion 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
FileList 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
ModuleList 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
FunctionsToExport 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
AliasesToExport 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
VariablesToExport 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
CmdletsToExport 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
OtherFiles 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ExportedFunctions 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ExportedAliases 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ExportedVariables 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ExportedCmdlets 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param changed">
RequiredModules 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Set-PSBreakpoint 
</td>
                <td>
                  <table id="pSet-PSBreakpoint" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param changed">
Script 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="added cmdlet">
Enable-PSRemoting 
</td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Remove-PSSession 
</td>
                <td>
                  <table id="pRemove-PSSession" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="param changed">
Session 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
Enter-PSSession 
</td>
                <td>
                  <table id="pEnter-PSSession" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
NoCompression 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="changed param">
Session 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="changed param">
SessionOption 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
New-PSSession 
</td>
                <td>
                  <table id="pNew-PSSession" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
NoCompression 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="changed param">
Session 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="changed param">
SessionOption 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
Export-PSSession 
</td>
                <td>
                  <table id="pExport-PSSession" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
OutputModule 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
Module 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
ModuleName 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
PSSnapin 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="changed param">
Session 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Import-PSSession 
</td>
                <td>
                  <table id="pImport-PSSession" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
Module 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
PSSnapin 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="changed param">
Session 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="added cmdlet">
New-PSSessionOption 
</td>
              </tr>
              <tr style="background-color: white">
                <td class="changed cmdlet">
Get-WSManInstance 
</td>
                <td>
                  <table id="pGet-WSManInstance" class="hidden" width="100%">
                    <tbody>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
Associations 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="added param">
CertificateThumbprint 
</td>
                      </tr>
                      <tr>
                        <td class="style1">
  
</td>
                        <td class="removed param">
References 
</td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
              <tr style="background-color: #f0f0f0">
                <td class="changed cmdlet">
Set-PSSessionConfiguration</td>
                <td class="added param">
ShowSecurityDescriptorUI</td>
              </tr>
            </tbody>
          </table>
        </p>
        <h4>Alias Changes
</h4>
        <p>
Some tweaking of aliases here. Personally I find alias changes in general to get under
my skin. Aliases are the first thing I learn and the first thing to trip me up when
things change. Regardless, the changes appear to make sense and are perhaps a bit
more mnemonic than before. 
</p>
        <p>
          <strong>Removed</strong>
        </p>
        <p>
          <span class="removed">emm</span> (Export-ModuleMember), <span class="removed">which</span> (Get-Command)
and <span class="removed">grid</span> (Out-Gridview)
</p>
        <p>
          <strong>Added</strong>
        </p>
        <p>
          <span class="added">ise</span> (powershell_ise.exe), <span class="added">rmo</span> (Remove-Module)
and <span class="added">saps</span> (Start-Process)
</p>
        <p>
          <strong>Changed</strong>
        </p>
        <p>
          <span class="changed">imo –&gt; ipmo</span> (Import-Module)
</p>
        <h4>Language Enhancements
</h4>
        <p>
The major change that has come to light so far is that statements are now allowed
on the right hand of an expression without having to use subexpressions. This is a
great fix, and one that will reduce the margin for error (and confusion) by a large
amount. Previously in CTP3, in order to use a statement like “if”, you had to use
the following syntax:
</p>
        <p>
        </p>
        <pre class="brush: posh">$result = $( if ($true) { 42 } )</pre>
        <p>
        </p>
        <p>
Now, you can drop the $( and ):
</p>
        <p>
        </p>
        <pre class="brush: posh">$result = if ($true) { 42 }</pre>
        <p>
        </p>
        <p>
or
</p>
        <p>
        </p>
        <pre class="brush: posh">$sequence = foreach ($i in 0..15) { [math]::pow(2, $i) }</pre>
        <p>
        </p>
        <p>
This is truly great stuff. 
</p>
        <h4>Jobs/Remoting
</h4>
        <p>
The best news here is the abundant help now available at your fingertips. Lots of
examples and meaty information concerning PSSessions and PSSessionConfigurations.
</p>
        <p>
          <strong>Local Jobs</strong>
        </p>
        <p>
Local jobs created now with Start-Job { ... } use an IPC channel to talk to the local
WinRM service to create jobs instead of using the more heavyweight HTTP channel. Yes,
you can infer from this that local jobs are still out of process; they run in their
own isolated runspace and have no access to the interactive session. What this means
in simpler terms is that local jobs are a lot faster now to get started. The biggest
win for local jobs is that <strong>they no longer require an elevated shell!</strong> you
can submit local jobs as a regular user now – just not remote ones (unless the applicable
remote PSSessionConfiguration is set to allow this - by default the ACL is admins
only).
</p>
        <p>
          <strong>Remoting</strong>
        </p>
        <p>
A welcome addition to this build is a new, dedicated <strong>Enable-PSRemoting</strong> Cmdlet:
</p>
        <p>
        </p>
        <div style="padding-bottom: 5px; background-color: #eeeeee; margin: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px">The
Enable-PSRemoting cmdlet configures the computer to receive Windows PowerShell remote
commands that are sent by using the WS-Management technology. 
<p></p><p>
You need to run this command only once on each computer that will receive commands.
You do not need to run it on computers that only send commands. Because the configuration
activates listeners, it is prudent to run it only where it is needed.
</p><p>
The Enable-PSRemoting cmdlet performs the following operations: 
</p><ul><li>
Runs the Set-WSManQuickConfig cmdlet, which performs the following tasks: 
<ul><li>
Starts the WinRM service. 
</li><li>
Sets the startup type on the WinRM service to Automatic. 
</li><li>
Creates a listener to accept requests on any IP address. 
</li><li>
Enables a firewall exception for WS-Management communications. 
</li></ul></li><li>
Enables all registered Windows PowerShell session configurations to receive instructions
from a remote computer. 
<ul><li>
Registers the "Microsoft.PowerShell" session configuration, if it is not already registered. 
</li><li>
Registers the "Microsoft.PowerShell32" session configuration on 64-bit computers,
if it is not already registered. 
</li><li>
Removes the "Deny Everyone" setting from the security descriptor for all the registered
session configurations. 
</li><li>
Restarts the WinRM service to make the preceding changes effective. 
</li></ul></li></ul></div>
        <p>
        </p>
        <p>
To run this cmdlet on Windows Vista, Windows Server 2008, and later versions of Windows,
you must start Windows PowerShell with the "Run as administrator" option. 
</p>
        <p>
          <strong>Session Configurations</strong>
        </p>
        <p>
There are a raft of Cmdlets dedicated to managing session configurations. So what
is a session configuration? To qoute the ever-present help system:
</p>
        <div style="padding-bottom: 5px; background-color: #eeeeee; margin: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px">
          <p>
A session configuration is a group of settings on the local computer that define the
environment for the Windows PowerShell sessions that are created when remote users
connect to the local computer.
</p>
          <p>
Administrators of the computer can use session configurations to protect the computer
and to define custom environments for users who connect to the computer.
</p>
          <p>
Administrators can also use session configurations to determine the permissions that
are required to connect to the computer remotely. By default, only members of the
Administrators group have permission to use the session configuration to connect remotely,
but you can change the default settings to allow all users, or selected users, to
connect remotely to your computer.
</p>
          <p>
Session configurations are a feature of Web Services for Management (WS-Management)
based Windows PowerShell remoting. They are used only when you use the New-PSSession,
Invoke-Command, or Enter-PSSession cmdlets to connect to a remote computer.
</p>
          <p>
            <strong>Note</strong>: To manage the session configurations on a computer that is
running Windows Vista, Windows Server 2008, or a later version of Windows, start Windows
PowerShell with the "Run as administrator" option.
</p>
        </div>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_thumb.png" width="640" height="300" />
          </a>
        </p>
        <p>
That SecurityDescriptorSddl property looks like a lot of fun to modify, right? Don’t
worry, the <strong>ShowSecurityDescriptorUI</strong> comes to the rescue:
</p>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0DifferencesBetweenCTP3Win7BetaandWi_8776/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0DifferencesBetweenCTP3Win7BetaandWi_8776/image_thumb.png" width="510" height="480" />
          </a>
        </p>
        <p>
        </p>
        <h3>Modules
</h3>
        <h5>Manifest Members
</h5>
        <p>
Modules have received some nice incremental improvements as well as some syntactic
changes. You should have noticed above that the manifest fields (exposed as parameters
on New-ModuleManifest)  have changed to reflect the two-stage process of how
a module’s members get exposed to the importer’s scope. A module passively <em>exports</em> members
with Export-ModuleMember, and the caller actively <em>imports</em> them with Import-Module;
hence “FunctionsToExport,” which subtly says that this can be imported.
</p>
        <p>
          <strong>Binary Modules</strong>
        </p>
        <p>
A binary module is now allowed to be the root module in a manifest by pointing the
ModuleToProcess key at the assembly, e.g. ModuleToProcess = “Pscx.dll.” This seems
more intuitive than before with the [seemingly] arbitrary restriction that they must
be secondary to a text based psm1.
</p>
        <h4>Built-In Modules
</h4>
        <p>
Shipping with Windows 7 for <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell</a> comes
two new Modules along with the others you should have noticed that arrived with CTP3
(BitsTransfer/FileTransfer and PSDiagnostics.)
</p>
        <p>
          <strong>AppLocker</strong>
        </p>
        <blockquote>
          <p>
AppLocker provides simple, powerful, rule-based structures for specifying which applications
can run that are centrally managed using Group Policy. It introduces "publisher rules"
that are based on an application's digital signature, making it possible to build
strong rules that account for application updates. For example, an organization can
create a rule to "allow all versions greater than 1.0 of Microsoft Dynamics CRM to
run if signed by Microsoft." With correctly structured rules, IT professionals can
safely deploy updates to allowed applications without having to build a new rule for
each version update.
</p>
        </blockquote>
        <p>
          <a href="http://technet.microsoft.com/en-us/windows/dd320283.aspx" target="_blank">About
AppLocker on TechNet</a>
        </p>
        <p>
          <strong>TroubleshootingPack</strong>
        </p>
        <blockquote>
          <p>
Windows Troubleshooting Platform (WTP) provides ISVs, OEMs, and administrators the
ability to write troubleshooting packs that discover and resolve software and hardware
issues, such as configuration issues, failed hardware, network issues, and application
compatibility issues. In WTP, an issue is referred to as a <em>root cause</em>. Previously,
troubleshooting software and hardware issues was a manual process; however, using
WTP you can automate the process of fixing the most common issues that the user might
encounter. 
</p>
        </blockquote>
        <p>
          <a href="http://msdn.microsoft.com/en-us/library/dd323706(VS.85).aspx" target="_blank">
            <strong>About
WTP on MSDN</strong>
          </a>
        </p>
        <h4>PowerShell Integrated Scripting Environment
</h4>
        <p>
The ISE has been vastly improved in terms of usability and sharpness in this build.
Difficult to isolate any one part of it that is much better; the whole experience
is just way smoother and intuitive. 
</p>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_thumb_1.png" width="640" height="271" />
          </a>
        </p>
        <h5>ISE Object Model
</h5>
        <p>
The object model naming has changed quite a bit to be more intuitive and friendly
to beginners. Who needs to know about Runspaces? It’s a Tab, silly!
</p>
        <table border="1" cellspacing="0" cellpadding="2" width="671">
          <tbody>
            <tr>
              <th valign="top" width="361">
CTP3</th>
              <th valign="top" width="308">
RC</th>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.CurrentOpenedRunspace</td>
              <td class="added" valign="top" width="308">
$psise.CurrentPowerShellTab</td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.CurrentOpenedRunspace.ToolsMenu</td>
              <td class="added" valign="top" width="308">
$psise.CurrentPowerShellTab.AddOnsMenu</td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.CurrentOpenedRunspace.OpenedFiles</td>
              <td class="added" valign="top" width="308">
$psise.CurrentPowerShellTab.Files</td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.CurrentOpenedRunspace.OpenedFiles.RemoveUnsaved($file)</td>
              <td class="added" valign="top" width="308">
$psise.CurrentPowerShellTab.Files.Remove($file,$true)</td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.OpenedRunspaces</td>
              <td class="added" valign="top" width="308">
$psise.PowerShellTabs</td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.OpenedRunspaces[1].Execute("string")</td>
              <td style="background-color: #ffeeee" valign="top" width="308">
                <span style="float: left" class="added">$psise.PowerShellTabs[1].Invoke({scriptBlock})</span>
                <span style="float: right; color: red">*</span>
              </td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.CurrentOpenedFile</td>
              <td class="added" valign="top" width="308">
$psise.CurrentFile</td>
            </tr>
            <tr>
              <td class="removed" valign="top" width="361">
$psise.Options.LocalHelp 
</td>
              <td class="added" valign="top" width="308">
$psise.Options.UseLocalHelp</td>
            </tr>
          </tbody>
        </table>
        <p>
          <font color="#ff0000">*</font>
          <strong>Note: </strong>You may only invoke script on
a tab <em>other</em> than the tab you’re using to execute this command (because you
can’t run two commands at the same time on the same tab!)
</p>
        <p>
The PowerShell team posted a way to make the RC build fairly compatible with CTP3
by adding new members to the $PSISE object which will proxy attempts to use the old
API to the new API. The post is called “<a href="http://blogs.msdn.com/powershell/archive/2009/05/27/update-typedata-ise-ctp3-vs-ise-rc-and-teched2009-demos.aspx" target="_blank">Update-TypeData,
ISE CTP3 vs ISE RC, and Teched2009 Demos</a>.” 
</p>
        <h5>Shortcut Changes
</h5>
        <p>
The shortcut to jump to the Script Pane is now Ctrl+I. (use Ctrl+D to jump to the
Command pane).
</p>
        <h4>Summary
</h4>
        <p>
The RC build is all about bugfixes and incremental improvements. I’m sure there’ll
be more fixes and additions as we near RTW/RTM and I’ll be here to post as much info
about them as possible. This is still just a drop in the ocean of what PowerShell
2.0 can do, and I’ll post more technical demos of features over the next little while.
</p>
        <p>
          <strong>Tips</strong>: run “Get-Help about_*” to get a list of all the overview topics
for the various features in PowerShell v2.
</p>
        <p>
Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=f789804c-5a35-4d5c-a303-d1a2bdc6bbc0" />
      </body>
      <title>PowerShell v2.0 – Differences Between CTP3/Win7Beta and Win7RC</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,f789804c-5a35-4d5c-a303-d1a2bdc6bbc0.aspx</guid>
      <link>http://www.nivot.org/2009/05/22/PowerShellV20DifferencesBetweenCTP3Win7BetaAndWin7RC.aspx</link>
      <pubDate>Fri, 22 May 2009 21:25:49 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;&lt;strong&gt;update #1 2009/5/23&lt;/strong&gt;: noted that local jobs (start-job) no longer
require an elevated shell.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;strong&gt;update #2 2009/5/28:&lt;/strong&gt; ISE object model and shortcut changes; update
for set-psessionconfiguration cmdlet (new screenshot); module changes (highlighted
new manifest member names, binary module can now be root module); &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
I’ve been meaning to write this for a while, but it’s been a busy time. This is a
comparison of the significant differences between the standalone CTP3 or Windows 7
Beta version and the version that comes with Win7 RC (6.1.7100.0). For all intents
and purposes, the CTP3 version (6.1.6469.0) is &lt;em&gt;exactly&lt;/em&gt; the same as the Windows
7 Beta (6.1.7000.0) version.
&lt;/p&gt;
&lt;p&gt;
This is not going to be an exhaustive list of differences, but I will continue to
update this post as I find more things worth documenting. It should be safe to bookmark
the permalink. One of the nicest things about this release is that it appears that,
without exception, &lt;strong&gt;all built-in Cmdlets have help.&lt;/strong&gt; A lot of things
have been cleaned up and fixed in this build, from formatting of text to typos and
minor bugs/glitches. 
&lt;/p&gt;
&lt;h4&gt;Cmdlet Differences
&lt;/h4&gt;
&lt;p&gt;
This is a table listing Cmdlets that have either &lt;span class="changed"&gt;changed&lt;/span&gt; (navy),
been &lt;span class="added"&gt;added&lt;/span&gt; (green, underlined) or &lt;span class="removed"&gt;removed&lt;/span&gt; (red,
strike-through.) Changed Cmdlets have their parameters listed in the second column.
A changed parameter means that its Type has been changed; e.g. it accepts a different
.NET object than before. This is generally nothing to worry about since the corresponding
source of such objects is usually changed to match – typically another Cmdlet. Parameters&amp;nbsp;
and Cmdlets that have not changed, are not listed. 
&lt;/p&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;&lt;!--
        #tbl td
        {
            vertical-align: top;
            font-size: 10pt;
        }
        .added
        {
            color: green;
            text-decoration: underline;
        }
        .removed
        {
            color: red;
            text-decoration: line-through;
        }
        .changed
        {
            color: navy;
        }
        .cmdlet
        {
            font-weight: bold;
            cursor: hand;
        }
        .param
        {
            font-style: italic;
            text-align: left;
        }
        .style1
        {
            width: 19px;
        }
    --&gt;&lt;/style&gt;
&lt;table id="tbl" border="1" width="600"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;
Cmdlet&lt;/th&gt;
&lt;th&gt;
Parameters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Invoke-Command 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pInvoke-Command" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param removed"&gt;
NoCompression 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param changed"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param changed"&gt;
SessionOption 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
Remove-Computer 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pRemove-Computer" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
Force 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
Reboot 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ComputerName 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Add-Computer 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pAdd-Computer" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ComputerName 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
Reboot 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="removed cmdlet"&gt;
Rename-Computer 
&lt;/td&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Test-Connection 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pTest-Connection" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
ComputerName 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
Quiet 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
Destination 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
Export-FormatData 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pExport-FormatData" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td class="added param"&gt;
Path 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
FilePath 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Receive-Job 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pReceive-Job" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param changed"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
Start-Job 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pStart-Job" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
InitializationScript 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
RunAs32 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ConfigurationName 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
CertificateThumbprint 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
NoCompression 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Get-Module 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pGet-Module" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
Recurse 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
New-ModuleManifest 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pNew-ModuleManifest" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
ProcessorArchitecture 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
DotNetFrameworkVersion 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
PowerShellHostName 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
PowerShellHostVersion 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
FileList 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
ModuleList 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
FunctionsToExport 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
AliasesToExport 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
VariablesToExport 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
CmdletsToExport 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
OtherFiles 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ExportedFunctions 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ExportedAliases 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ExportedVariables 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ExportedCmdlets 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param changed"&gt;
RequiredModules 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Set-PSBreakpoint 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pSet-PSBreakpoint" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param changed"&gt;
Script 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="added cmdlet"&gt;
Enable-PSRemoting 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Remove-PSSession 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pRemove-PSSession" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="param changed"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
Enter-PSSession 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pEnter-PSSession" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
NoCompression 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="changed param"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="changed param"&gt;
SessionOption 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
New-PSSession 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pNew-PSSession" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
NoCompression 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="changed param"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="changed param"&gt;
SessionOption 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
Export-PSSession 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pExport-PSSession" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
OutputModule 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
Module 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
ModuleName 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
PSSnapin 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="changed param"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Import-PSSession 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pImport-PSSession" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
Module 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
PSSnapin 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="changed param"&gt;
Session 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="added cmdlet"&gt;
New-PSSessionOption 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: white"&gt;
&lt;td class="changed cmdlet"&gt;
Get-WSManInstance 
&lt;/td&gt;
&lt;td&gt;
&lt;table id="pGet-WSManInstance" class="hidden" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
Associations 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="added param"&gt;
CertificateThumbprint 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="style1"&gt;
&amp;nbsp; 
&lt;/td&gt;
&lt;td class="removed param"&gt;
References 
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="background-color: #f0f0f0"&gt;
&lt;td class="changed cmdlet"&gt;
Set-PSSessionConfiguration&lt;/td&gt;
&lt;td class="added param"&gt;
ShowSecurityDescriptorUI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;h4&gt;Alias Changes
&lt;/h4&gt;
&lt;p&gt;
Some tweaking of aliases here. Personally I find alias changes in general to get under
my skin. Aliases are the first thing I learn and the first thing to trip me up when
things change. Regardless, the changes appear to make sense and are perhaps a bit
more mnemonic than before. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Removed&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class="removed"&gt;emm&lt;/span&gt; (Export-ModuleMember), &lt;span class="removed"&gt;which&lt;/span&gt; (Get-Command)
and &lt;span class="removed"&gt;grid&lt;/span&gt; (Out-Gridview)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Added&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class="added"&gt;ise&lt;/span&gt; (powershell_ise.exe), &lt;span class="added"&gt;rmo&lt;/span&gt; (Remove-Module)
and &lt;span class="added"&gt;saps&lt;/span&gt; (Start-Process)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Changed&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class="changed"&gt;imo –&amp;gt; ipmo&lt;/span&gt; (Import-Module)
&lt;/p&gt;
&lt;h4&gt;Language Enhancements
&lt;/h4&gt;
&lt;p&gt;
The major change that has come to light so far is that statements are now allowed
on the right hand of an expression without having to use subexpressions. This is a
great fix, and one that will reduce the margin for error (and confusion) by a large
amount. Previously in CTP3, in order to use a statement like “if”, you had to use
the following syntax:
&lt;/p&gt;
&lt;p&gt;
&lt;pre class="brush: posh"&gt;$result = $( if ($true) { 42 } )&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Now, you can drop the $( and ):
&lt;/p&gt;
&lt;p&gt;
&lt;pre class="brush: posh"&gt;$result = if ($true) { 42 }&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
or
&lt;/p&gt;
&lt;p&gt;
&lt;pre class="brush: posh"&gt;$sequence = foreach ($i in 0..15) { [math]::pow(2, $i) }&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
This is truly great stuff. 
&lt;/p&gt;
&lt;h4&gt;Jobs/Remoting
&lt;/h4&gt;
&lt;p&gt;
The best news here is the abundant help now available at your fingertips. Lots of
examples and meaty information concerning PSSessions and PSSessionConfigurations.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Local Jobs&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Local jobs created now with Start-Job { ... } use an IPC channel to talk to the local
WinRM service to create jobs instead of using the more heavyweight HTTP channel. Yes,
you can infer from this that local jobs are still out of process; they run in their
own isolated runspace and have no access to the interactive session. What this means
in simpler terms is that local jobs are a lot faster now to get started. The biggest
win for local jobs is that &lt;strong&gt;they no longer require an elevated shell!&lt;/strong&gt; you
can submit local jobs as a regular user now – just not remote ones (unless the applicable
remote PSSessionConfiguration is set to allow this - by default the ACL is admins
only).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Remoting&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
A welcome addition to this build is a new, dedicated &lt;strong&gt;Enable-PSRemoting&lt;/strong&gt; Cmdlet:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-bottom: 5px; background-color: #eeeeee; margin: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px"&gt;The
Enable-PSRemoting cmdlet configures the computer to receive Windows PowerShell remote
commands that are sent by using the WS-Management technology. 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
You need to run this command only once on each computer that will receive commands.
You do not need to run it on computers that only send commands. Because the configuration
activates listeners, it is prudent to run it only where it is needed.
&lt;/p&gt;
&lt;p&gt;
The Enable-PSRemoting cmdlet performs the following operations: 
&lt;ul&gt;
&lt;li&gt;
Runs the Set-WSManQuickConfig cmdlet, which performs the following tasks: 
&lt;ul&gt;
&lt;li&gt;
Starts the WinRM service. 
&lt;li&gt;
Sets the startup type on the WinRM service to Automatic. 
&lt;li&gt;
Creates a listener to accept requests on any IP address. 
&lt;li&gt;
Enables a firewall exception for WS-Management communications. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Enables all registered Windows PowerShell session configurations to receive instructions
from a remote computer. 
&lt;ul&gt;
&lt;li&gt;
Registers the "Microsoft.PowerShell" session configuration, if it is not already registered. 
&lt;li&gt;
Registers the "Microsoft.PowerShell32" session configuration on 64-bit computers,
if it is not already registered. 
&lt;li&gt;
Removes the "Deny Everyone" setting from the security descriptor for all the registered
session configurations. 
&lt;li&gt;
Restarts the WinRM service to make the preceding changes effective. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
To run this cmdlet on Windows Vista, Windows Server 2008, and later versions of Windows,
you must start Windows PowerShell with the "Run as administrator" option. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Session Configurations&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
There are a raft of Cmdlets dedicated to managing session configurations. So what
is a session configuration? To qoute the ever-present help system:
&lt;/p&gt;
&lt;div style="padding-bottom: 5px; background-color: #eeeeee; margin: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px"&gt;
&lt;p&gt;
A session configuration is a group of settings on the local computer that define the
environment for the Windows PowerShell sessions that are created when remote users
connect to the local computer.
&lt;/p&gt;
&lt;p&gt;
Administrators of the computer can use session configurations to protect the computer
and to define custom environments for users who connect to the computer.
&lt;/p&gt;
&lt;p&gt;
Administrators can also use session configurations to determine the permissions that
are required to connect to the computer remotely. By default, only members of the
Administrators group have permission to use the session configuration to connect remotely,
but you can change the default settings to allow all users, or selected users, to
connect remotely to your computer.
&lt;/p&gt;
&lt;p&gt;
Session configurations are a feature of Web Services for Management (WS-Management)
based Windows PowerShell remoting. They are used only when you use the New-PSSession,
Invoke-Command, or Enter-PSSession cmdlets to connect to a remote computer.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note&lt;/strong&gt;: To manage the session configurations on a computer that is
running Windows Vista, Windows Server 2008, or a later version of Windows, start Windows
PowerShell with the "Run as administrator" option.
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_thumb.png" width="640" height="300"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
That SecurityDescriptorSddl property looks like a lot of fun to modify, right? Don’t
worry, the &lt;strong&gt;ShowSecurityDescriptorUI&lt;/strong&gt; comes to the rescue:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0DifferencesBetweenCTP3Win7BetaandWi_8776/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0DifferencesBetweenCTP3Win7BetaandWi_8776/image_thumb.png" width="510" height="480"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3&gt;Modules
&lt;/h3&gt;
&lt;h5&gt;Manifest Members
&lt;/h5&gt;
&lt;p&gt;
Modules have received some nice incremental improvements as well as some syntactic
changes. You should have noticed above that the manifest fields (exposed as parameters
on New-ModuleManifest)&amp;nbsp; have changed to reflect the two-stage process of how
a module’s members get exposed to the importer’s scope. A module passively &lt;em&gt;exports&lt;/em&gt; members
with Export-ModuleMember, and the caller actively &lt;em&gt;imports&lt;/em&gt; them with Import-Module;
hence “FunctionsToExport,” which subtly says that this can be imported.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Binary Modules&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
A binary module is now allowed to be the root module in a manifest by pointing the
ModuleToProcess key at the assembly, e.g. ModuleToProcess = “Pscx.dll.” This seems
more intuitive than before with the [seemingly] arbitrary restriction that they must
be secondary to a text based psm1.
&lt;/p&gt;
&lt;h4&gt;Built-In Modules
&lt;/h4&gt;
&lt;p&gt;
Shipping with Windows 7 for &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; comes
two new Modules along with the others you should have noticed that arrived with CTP3
(BitsTransfer/FileTransfer and PSDiagnostics.)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;AppLocker&lt;/strong&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
AppLocker provides simple, powerful, rule-based structures for specifying which applications
can run that are centrally managed using Group Policy. It introduces "publisher rules"
that are based on an application's digital signature, making it possible to build
strong rules that account for application updates. For example, an organization can
create a rule to "allow all versions greater than 1.0 of Microsoft Dynamics CRM to
run if signed by Microsoft." With correctly structured rules, IT professionals can
safely deploy updates to allowed applications without having to build a new rule for
each version update.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;a href="http://technet.microsoft.com/en-us/windows/dd320283.aspx" target="_blank"&gt;About
AppLocker on TechNet&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;TroubleshootingPack&lt;/strong&gt;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Windows Troubleshooting Platform (WTP) provides ISVs, OEMs, and administrators the
ability to write troubleshooting packs that discover and resolve software and hardware
issues, such as configuration issues, failed hardware, network issues, and application
compatibility issues. In WTP, an issue is referred to as a &lt;em&gt;root cause&lt;/em&gt;. Previously,
troubleshooting software and hardware issues was a manual process; however, using
WTP you can automate the process of fixing the most common issues that the user might
encounter. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/dd323706(VS.85).aspx" target="_blank"&gt;&lt;strong&gt;About
WTP on MSDN&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;PowerShell Integrated Scripting Environment
&lt;/h4&gt;
&lt;p&gt;
The ISE has been vastly improved in terms of usability and sharpness in this build.
Difficult to isolate any one part of it that is much better; the whole experience
is just way smoother and intuitive. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/PowerSh.0DifferencesBetweenCTP3andWin7RC_D88A/image_thumb_1.png" width="640" height="271"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;h5&gt;ISE Object Model
&lt;/h5&gt;
&lt;p&gt;
The object model naming has changed quite a bit to be more intuitive and friendly
to beginners. Who needs to know about Runspaces? It’s a Tab, silly!
&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="2" width="671"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th valign="top" width="361"&gt;
CTP3&lt;/th&gt;
&lt;th valign="top" width="308"&gt;
RC&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.CurrentOpenedRunspace&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.CurrentPowerShellTab&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.CurrentOpenedRunspace.ToolsMenu&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.CurrentPowerShellTab.AddOnsMenu&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.CurrentOpenedRunspace.OpenedFiles&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.CurrentPowerShellTab.Files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.CurrentOpenedRunspace.OpenedFiles.RemoveUnsaved($file)&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.CurrentPowerShellTab.Files.Remove($file,$true)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.OpenedRunspaces&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.PowerShellTabs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.OpenedRunspaces[1].Execute("string")&lt;/td&gt;
&lt;td style="background-color: #ffeeee" valign="top" width="308"&gt;
&lt;span style="float: left" class="added"&gt;$psise.PowerShellTabs[1].Invoke({scriptBlock})&lt;/span&gt;&lt;span style="float: right; color: red"&gt;*&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.CurrentOpenedFile&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.CurrentFile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="removed" valign="top" width="361"&gt;
$psise.Options.LocalHelp 
&lt;/td&gt;
&lt;td class="added" valign="top" width="308"&gt;
$psise.Options.UseLocalHelp&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&lt;font color="#ff0000"&gt;*&lt;/font&gt; &lt;strong&gt;Note: &lt;/strong&gt;You may only invoke script on
a tab &lt;em&gt;other&lt;/em&gt; than the tab you’re using to execute this command (because you
can’t run two commands at the same time on the same tab!)
&lt;/p&gt;
&lt;p&gt;
The PowerShell team posted a way to make the RC build fairly compatible with CTP3
by adding new members to the $PSISE object which will proxy attempts to use the old
API to the new API. The post is called “&lt;a href="http://blogs.msdn.com/powershell/archive/2009/05/27/update-typedata-ise-ctp3-vs-ise-rc-and-teched2009-demos.aspx" target="_blank"&gt;Update-TypeData,
ISE CTP3 vs ISE RC, and Teched2009 Demos&lt;/a&gt;.” 
&lt;h5&gt;Shortcut Changes
&lt;/h5&gt;
&lt;p&gt;
The shortcut to jump to the Script Pane is now Ctrl+I. (use Ctrl+D to jump to the
Command pane).
&lt;/p&gt;
&lt;h4&gt;Summary
&lt;/h4&gt;
&lt;p&gt;
The RC build is all about bugfixes and incremental improvements. I’m sure there’ll
be more fixes and additions as we near RTW/RTM and I’ll be here to post as much info
about them as possible. This is still just a drop in the ocean of what PowerShell
2.0 can do, and I’ll post more technical demos of features over the next little while.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Tips&lt;/strong&gt;: run “Get-Help about_*” to get a list of all the overview topics
for the various features in PowerShell v2.
&lt;/p&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=f789804c-5a35-4d5c-a303-d1a2bdc6bbc0" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,f789804c-5a35-4d5c-a303-d1a2bdc6bbc0.aspx</comments>
      <category>.NET</category>
      <category>Cmdlets</category>
      <category>CTP3</category>
      <category>Microsoft</category>
      <category>Modules</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
      <category>RC</category>
      <category>Windows 7</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=1cffb994-49df-4dfc-80ca-813a604d1408</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,1cffb994-49df-4dfc-80ca-813a604d1408.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,1cffb994-49df-4dfc-80ca-813a604d1408.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=1cffb994-49df-4dfc-80ca-813a604d1408</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hey, so we did the unthinkable. We released another version of the PowerShell Community
Extensions. We’re calling it a beta, because we’ve be so swamped with Real Life stuff
that we’re not 100% confident that it is defect-free. It’s not going to murder your
servers or anything, but there might be some documentation missing and other minor
stuff. We’d really appreciate it if you can give it a test-drive. If you’re running
PowerShell v1.0 or v2.0 CTP3, please use the MSI installer. It will upgrade your Pscx
1.1.1 install if you have one. If, on the other hand, you are running Windows 7 RC
and/or have a later version of PowerShell than v2 CTP3, you can download the zipped
module and unzip to your user profile module directory at ~\documents\windowspowershell\modules\
and load it using “import-module pscx.”
</p>
        <p>
Thanks for your infinite patience (yes, it’s been a while and we’re sorry) and please
leave comments and issues on the tracker at <a href="http://pscx.codeplex.com/">http://pscx.codeplex.com/</a></p>
        <p>
          <a href="http://pscx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=1615" target="_blank">View
the 1.2 Beta release page</a>.
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=1cffb994-49df-4dfc-80ca-813a604d1408" />
      </body>
      <title>Pscx 1.2 Beta Released</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,1cffb994-49df-4dfc-80ca-813a604d1408.aspx</guid>
      <link>http://www.nivot.org/2009/05/15/Pscx12BetaReleased.aspx</link>
      <pubDate>Fri, 15 May 2009 00:28:13 GMT</pubDate>
      <description>&lt;p&gt;
Hey, so we did the unthinkable. We released another version of the PowerShell Community
Extensions. We’re calling it a beta, because we’ve be so swamped with Real Life stuff
that we’re not 100% confident that it is defect-free. It’s not going to murder your
servers or anything, but there might be some documentation missing and other minor
stuff. We’d really appreciate it if you can give it a test-drive. If you’re running
PowerShell v1.0 or v2.0 CTP3, please use the MSI installer. It will upgrade your Pscx
1.1.1 install if you have one. If, on the other hand, you are running Windows 7 RC
and/or have a later version of PowerShell than v2 CTP3, you can download the zipped
module and unzip to your user profile module directory at ~\documents\windowspowershell\modules\
and load it using “import-module pscx.”
&lt;/p&gt;
&lt;p&gt;
Thanks for your infinite patience (yes, it’s been a while and we’re sorry) and please
leave comments and issues on the tracker at &lt;a href="http://pscx.codeplex.com/"&gt;http://pscx.codeplex.com/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://pscx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=1615" target="_blank"&gt;View
the 1.2 Beta release page&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=1cffb994-49df-4dfc-80ca-813a604d1408" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,1cffb994-49df-4dfc-80ca-813a604d1408.aspx</comments>
      <category>Cmdlets</category>
      <category>CTP3</category>
      <category>Modules</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
      <category>PSCX</category>
      <category>SnapIns</category>
      <category>Windows 7</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=1c6f9d27-3486-4203-b2a2-862d4fc754ec</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,1c6f9d27-3486-4203-b2a2-862d4fc754ec.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,1c6f9d27-3486-4203-b2a2-862d4fc754ec.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=1c6f9d27-3486-4203-b2a2-862d4fc754ec</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a bit of a hardcore example of the power that modules have brought to the
table in v2.0. First, a little background - PowerShell’s type adaptation system has
always ignored the concept of interfaces. Frankly, it never really needed to pay them
any attention. The adapted view of any instance of a .NET class is just an aggregate
of all its methods; the most derived instance is the default, and only, view. This
is the most simple and most frequently used view. However, this all goes to hell when
you bring in the notion of explicit interfaces. 
</p>
        <h5>Explicit Interface Definitions
</h5>
        <p>
Here’s an example of a C# class, Test, with two interfaces: IFace, and IFaceEx. I’ve
put this whole example in PowerShell script so you can easily test it without firing
up Visual Studio. Add-Type cmdlet to the rescue!
</p>
        <pre class="brush: posh">if (-not ("Test" -as [type])) {    
    add-type @"
        public interface IFace {
            string Hello(string name);
            string Goodbye();
        }
        
        public interface IFaceEx {
            string Hello(string name);
            string Goodbye();
            string Prop1 {
                get;
                set;
            }                
        }
        
        public class Test : IFace, IFaceEx {
            public string Hello(string name) {
                return "Hello" + name + " from IFace";
            }
            public string Goodbye() {
                return "Goodbye from IFace";
            }            
            string IFaceEx.Hello(string name) {
                return "Hello " + name + " from IFaceEx";
            }
            string IFaceEx.Goodbye() {
                return "Goodbye from IFaceEx";
            }
            
            private string _prop1 = "Foo";
            
            string IFaceEx.Prop1 {
                get { return _prop1; }
                set { _prop1 = value; }
            }
        }
"@    
}
</pre>
        <p>
If you new up an instance of Test, you’ll see that the explicit interface definitions
are hidden. Any calls to Hello(string) will invoke the IFace implementation.
</p>
        <p>
          <strong>There is no way to call IFaceEx.Hello without using reflection!</strong>
        </p>
        <p>
So, this is where the beauty of modules can help us. The following function will take
an instance of a .NET class, and the interface you want a  reference to, and
will return a PSCustomObject with ScriptMethods and ScriptProperties bound to that
interface’s contract. You don’t have to do this only with explicit interfaces, any
interfaces will work ;-)
</p>
        <h5>Introducing Get-Interface
</h5>
        <p>
A script is worth a thousand words.
</p>
        <pre class="brush: posh">function Get-Interface {

#.Synopsis
#   Allows PowerShell to call specific interface implementations on any .NET object. 
#.Description
#   Allows PowerShell to call specific interface implementations on any .NET object. 
#
#   As of v2.0, PowerShell cannot cast .NET instances to a particular interface. This makes it
#   impossible (shy of reflection) to call methods on explicitly implemented interfaces.   
#.Parameter Object
#   An instance of a .NET class from which you want to get a reference to a particular interface it defines.
#.Parameter InterfaceType
#   An interface type, e.g. [idisposable], implemented by the target object.
#.Example
#   // a class with explicitly implemented interface   
#   public class MyObj : IDisposable {
#      void IDisposable.Dispose()
#   }
#   
#   ps&gt; $o = new-object MyObj
#   ps&gt; $i = get-interface $o ([idisposable])
#   ps&gt; $i.Dispose()      
#.ReturnValue
#   A PSCustomObject with ScriptMethods and ScriptProperties representing methods and properties on the target interface.
#.Notes
#   AUTHOR:    Oisin Grehan http://www.nivot.org/
#   LASTEDIT:  2009-03-25 11:35:23

    [CmdletBinding()]
    param(
        [ValidateNotNull()]
        $Object,
        
        [ValidateScript( { $_.IsInterface } )]
        [type]$InterfaceType
    )

    $private:t  = $Object.GetType()
    
    try {
        
        $private:m  = $t.GetInterfaceMap($InterfaceType)

    } catch [argumentexception] {
        
        throw "Interface $($InterfaceType.Name) not found on ${t}!"
    }

    $private:im = $m.InterfaceMethods
    $private:tm = $m.TargetMethods
    
    # TODO: use param blocks in functions instead of $args
    #       so method signatures are visible via get-member
    
    $body = [scriptblock]::Create(@"
        param(`$o, `$i)    
        
        `$script:t  = `$o.GetType()
        `$script:m  = `$t.GetInterfaceMap(`$i)
        `$script:im = `$m.InterfaceMethods
        `$script:tm = `$m.TargetMethods
        
        # interface methods $($im.count)
        # target methods $($tm.count)
        
        $(
            for ($ix = 0; $ix -lt $im.Count; $ix++) {
                $mb = $im[$ix]
                @"
                function $($mb.Name) {
                    `$tm[$ix].Invoke(`$o, `$args)
                }

                $(if (!$mb.IsSpecialName) {
                    @"
                    Export-ModuleMember $($mb.Name)

"@
                })
"@
            }
        )
"@)
    write-verbose $body.tostring()    
    
    # create dynamic module
    $module = new-module -ScriptBlock $body -Args $Object, $InterfaceType -Verbose
        
    # generate method proxies - all exported members become scriptmethods
    # however, we are careful not to export getters and setters.
    $custom = $module.AsCustomObject()
    
    # add property proxies - need to use scriptproperties here.
    # modules cannot expose true properties, only variables and 
    # we cannot intercept variables get/set.
    
    $InterfaceType.GetProperties() | % {

        $propName = $_.Name
        $getter   = $null
        $setter   = $null
       
        if ($_.CanRead) {
            
            # where is the getter methodinfo on the interface map?
            $ix = [array]::indexof($im, $_.GetGetMethod())
            
            # bind the getter scriptblock to our module's scope
            # and generate script to call target method
            $getter = $module.NewBoundScriptBlock(
                [scriptblock]::create("`$tm[{0}].Invoke(`$o, @())" -f $ix))
        }
        
        if ($_.CanWrite) {
            
            # where is the setter methodinfo on the interface map?
            $ix = [array]::indexof($im, $_.GetSetMethod())
            
            # bind the setter scriptblock to our module's scope
            # and generate script to call target method
            $setter = $module.NewBoundScriptBlock(
                [scriptblock]::create(
                    "param(`$value); `$tm[{0}].Invoke(`$o, `$value)" -f $ix))
        }
        
        # add our property to the pscustomobject
        $prop = new-object management.automation.psscriptproperty $propName, $getter, $setter
        $custom.psobject.properties.add($prop)
    }
    
    # insert the interface name at the head of the typename chain (for get-member info)
    $custom.psobject.TypeNames.Insert(0, $InterfaceType.FullName)
    
    # dump our pscustomobject to pipeline
    $custom
}
</pre>Here's
how to use it, with our example Test class as added earlier: <pre class="brush: posh">$if = Get-Interface (new-object test) ([ifaceex]) -verbose
$if.Hello("Oisin") # returns Hello Oisin from IFaceEx

$if.Prop1 = "Test" # property setter
$if.Prop1 # propery getter
</pre><p>
Have fun!
</p><img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=1c6f9d27-3486-4203-b2a2-862d4fc754ec" /></body>
      <title>PowerShell 2.0 CTP3: Modules, in Practice – .NET Interfaces</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,1c6f9d27-3486-4203-b2a2-862d4fc754ec.aspx</guid>
      <link>http://www.nivot.org/2009/03/26/PowerShell20CTP3ModulesInPracticeNETInterfaces.aspx</link>
      <pubDate>Thu, 26 Mar 2009 14:02:44 GMT</pubDate>
      <description>&lt;p&gt;
This is a bit of a hardcore example of the power that modules have brought to the
table in v2.0. First, a little background - PowerShell’s type adaptation system has
always ignored the concept of interfaces. Frankly, it never really needed to pay them
any attention. The adapted view of any instance of a .NET class is just an aggregate
of all its methods; the most derived instance is the default, and only, view. This
is the most simple and most frequently used view. However, this all goes to hell when
you bring in the notion of explicit interfaces. 
&lt;/p&gt;
&lt;h5&gt;Explicit Interface Definitions
&lt;/h5&gt;
&lt;p&gt;
Here’s an example of a C# class, Test, with two interfaces: IFace, and IFaceEx. I’ve
put this whole example in PowerShell script so you can easily test it without firing
up Visual Studio. Add-Type cmdlet to the rescue!
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;if (-not ("Test" -as [type])) {    
    add-type @"
        public interface IFace {
            string Hello(string name);
            string Goodbye();
        }
        
        public interface IFaceEx {
            string Hello(string name);
            string Goodbye();
            string Prop1 {
                get;
                set;
            }                
        }
        
        public class Test : IFace, IFaceEx {
            public string Hello(string name) {
                return "Hello" + name + " from IFace";
            }
            public string Goodbye() {
                return "Goodbye from IFace";
            }            
            string IFaceEx.Hello(string name) {
                return "Hello " + name + " from IFaceEx";
            }
            string IFaceEx.Goodbye() {
                return "Goodbye from IFaceEx";
            }
            
            private string _prop1 = "Foo";
            
            string IFaceEx.Prop1 {
                get { return _prop1; }
                set { _prop1 = value; }
            }
        }
"@    
}
&lt;/pre&gt;
&lt;p&gt;
If you new up an instance of Test, you’ll see that the explicit interface definitions
are hidden. Any calls to Hello(string) will invoke the IFace implementation.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;There is no way to call IFaceEx.Hello without using reflection!&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
So, this is where the beauty of modules can help us. The following function will take
an instance of a .NET class, and the interface you want a&amp;nbsp; reference to, and
will return a PSCustomObject with ScriptMethods and ScriptProperties bound to that
interface’s contract. You don’t have to do this only with explicit interfaces, any
interfaces will work ;-)
&lt;/p&gt;
&lt;h5&gt;Introducing Get-Interface
&lt;/h5&gt;
&lt;p&gt;
A script is worth a thousand words.
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;function Get-Interface {

#.Synopsis
#   Allows PowerShell to call specific interface implementations on any .NET object. 
#.Description
#   Allows PowerShell to call specific interface implementations on any .NET object. 
#
#   As of v2.0, PowerShell cannot cast .NET instances to a particular interface. This makes it
#   impossible (shy of reflection) to call methods on explicitly implemented interfaces.   
#.Parameter Object
#   An instance of a .NET class from which you want to get a reference to a particular interface it defines.
#.Parameter InterfaceType
#   An interface type, e.g. [idisposable], implemented by the target object.
#.Example
#   // a class with explicitly implemented interface   
#   public class MyObj : IDisposable {
#      void IDisposable.Dispose()
#   }
#   
#   ps&amp;gt; $o = new-object MyObj
#   ps&amp;gt; $i = get-interface $o ([idisposable])
#   ps&amp;gt; $i.Dispose()      
#.ReturnValue
#   A PSCustomObject with ScriptMethods and ScriptProperties representing methods and properties on the target interface.
#.Notes
#   AUTHOR:    Oisin Grehan http://www.nivot.org/
#   LASTEDIT:  2009-03-25 11:35:23

    [CmdletBinding()]
    param(
        [ValidateNotNull()]
        $Object,
        
        [ValidateScript( { $_.IsInterface } )]
        [type]$InterfaceType
    )

    $private:t  = $Object.GetType()
    
    try {
        
        $private:m  = $t.GetInterfaceMap($InterfaceType)

    } catch [argumentexception] {
        
        throw "Interface $($InterfaceType.Name) not found on ${t}!"
    }

    $private:im = $m.InterfaceMethods
    $private:tm = $m.TargetMethods
    
    # TODO: use param blocks in functions instead of $args
    #       so method signatures are visible via get-member
    
    $body = [scriptblock]::Create(@"
        param(`$o, `$i)    
        
        `$script:t  = `$o.GetType()
        `$script:m  = `$t.GetInterfaceMap(`$i)
        `$script:im = `$m.InterfaceMethods
        `$script:tm = `$m.TargetMethods
        
        # interface methods $($im.count)
        # target methods $($tm.count)
        
        $(
            for ($ix = 0; $ix -lt $im.Count; $ix++) {
                $mb = $im[$ix]
                @"
                function $($mb.Name) {
                    `$tm[$ix].Invoke(`$o, `$args)
                }

                $(if (!$mb.IsSpecialName) {
                    @"
                    Export-ModuleMember $($mb.Name)

"@
                })
"@
            }
        )
"@)
    write-verbose $body.tostring()    
    
    # create dynamic module
    $module = new-module -ScriptBlock $body -Args $Object, $InterfaceType -Verbose
        
    # generate method proxies - all exported members become scriptmethods
    # however, we are careful not to export getters and setters.
    $custom = $module.AsCustomObject()
    
    # add property proxies - need to use scriptproperties here.
    # modules cannot expose true properties, only variables and 
    # we cannot intercept variables get/set.
    
    $InterfaceType.GetProperties() | % {

        $propName = $_.Name
        $getter   = $null
        $setter   = $null
       
        if ($_.CanRead) {
            
            # where is the getter methodinfo on the interface map?
            $ix = [array]::indexof($im, $_.GetGetMethod())
            
            # bind the getter scriptblock to our module's scope
            # and generate script to call target method
            $getter = $module.NewBoundScriptBlock(
                [scriptblock]::create("`$tm[{0}].Invoke(`$o, @())" -f $ix))
        }
        
        if ($_.CanWrite) {
            
            # where is the setter methodinfo on the interface map?
            $ix = [array]::indexof($im, $_.GetSetMethod())
            
            # bind the setter scriptblock to our module's scope
            # and generate script to call target method
            $setter = $module.NewBoundScriptBlock(
                [scriptblock]::create(
                    "param(`$value); `$tm[{0}].Invoke(`$o, `$value)" -f $ix))
        }
        
        # add our property to the pscustomobject
        $prop = new-object management.automation.psscriptproperty $propName, $getter, $setter
        $custom.psobject.properties.add($prop)
    }
    
    # insert the interface name at the head of the typename chain (for get-member info)
    $custom.psobject.TypeNames.Insert(0, $InterfaceType.FullName)
    
    # dump our pscustomobject to pipeline
    $custom
}
&lt;/pre&gt;Here's
how to use it, with our example Test class as added earlier: &lt;pre class="brush: posh"&gt;$if = Get-Interface (new-object test) ([ifaceex]) -verbose
$if.Hello("Oisin") # returns Hello Oisin from IFaceEx

$if.Prop1 = "Test" # property setter
$if.Prop1 # propery getter
&lt;/pre&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=1c6f9d27-3486-4203-b2a2-862d4fc754ec" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,1c6f9d27-3486-4203-b2a2-862d4fc754ec.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>Modules</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=ae63739d-54e0-47df-b8f9-19ceb1890f95</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,ae63739d-54e0-47df-b8f9-19ceb1890f95.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,ae63739d-54e0-47df-b8f9-19ceb1890f95.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=ae63739d-54e0-47df-b8f9-19ceb1890f95</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There’s a bit of a flap going on now around the blogosphere as various vendors, eager
to get onto the PowerShell train, are doing the bare minimum to get their product
“powershellized.” No one has spent any time reading – or if they did, they weren’t
successful in trying to understand it – the <a href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/cmdline_std.mspx" target="_blank">Microsoft
Command Line Standard</a>. 
</p>
        <h4>Modules as Namespaces
</h4>
        <p>
That’s right, modules are not as crazy sounding as they seem. They can be used quite
simply to just group a load of functions together while allowing easy disambiguation
should there be a name collision with another function or cmdlet. It wasn’t always
this easy. 
</p>
        <h5>Namespaces in PowerShell v1.0
</h5>
        <p>
In PowerShell v1.0 it was possible to load two snap-ins that contained identically
named commands. This causes PowerShell to spit out an error about ambiguous commands
should you try to invoke one. The answer to this was to get the containing snap-in
name, and prefix it to the cmdlet name using a backslash as a separator:
</p>
        <pre class="brush: posh">$o = Pscx\New-Object Collections.Generic.Dictionary –Of String, Int
</pre>
        <p>
As you can see, this lets us call the hypothetical PowerShell Community Extensions
version of New-Object to create a generic type. If you want to call the original one,
you would have to prefix it like this:
</p>
        <pre class="brush: posh">$o = Microsoft.PowerShell.Utility\New-Object Int[] 5
</pre>
        <p>
Blech - that’s a bit of a lengthy sentence, but the solution to this is to use an
alias. Aliases are found before Cmdlets in the search path:
</p>
        <pre class="brush: posh">New-Alias New-Object Microsoft.PowerShell.Utility\New-Object
$o = New-Object Int[] 5 
</pre>
        <p>
The reason we need an alias here is because if you just typed the cmdlet without the
snap-in prefix, PowerShell v1.0 complains that it doesn’t know which one you want.
We forgot to add the mind reader snap-in!
</p>
        <p>
How about functions in PowerShell v1.0? If you dot source a ps1 file that contains
functions that already exist in the caller’s session, how do you disambiguate them?
Oops! You can’t. They are overwritten. Ouch. 
</p>
        <p>
You cannot use the namespace\ prefix for functions in v1 - the support is just not
there. However…
</p>
        <h5>Namespaces in PowerShell v2.0
</h5>
        <p>
Things are a lot better in this version. Let’s say you have two groups of functions
that you use in your business. One for your SharePoint farms, and another set for
your Citrix farms. Let’s ignore the perfectly acceptable idea of prefixing the noun
to differentiate for the moment and just imagine we have two ps1 files, containing
ideally named function with approved verb, simple noun:
</p>
        <pre class="brush: posh"># sharepoint functions
function Get-Server {
   # ... gets sharepoint server
}
function Get-Farm {
   # ... gets sharepoint farm
}
</pre>
        <p>
And the second script:
</p>
        <pre class="brush: posh"># citrix functions
function Get-Server {
    # ... gets citrix server
}
function Get-Farm {
    # ... gets citrix farm
}
</pre>
        <p>
If you tried to load these up with via a dot source, one after the other, the functions
from the second ps1 would overwrite the first lot. So this is where the wonder world
of modules is entered. First step:
</p>
        <p>
After renaming both ps1 files to use the psm1 extension instead, you have created
modules of the simplest form. Ignoring the details of how this is deployed (there
are several ways – documented on Microsoft and on many blogs, including this one),
let's look at how it's loaded and used:
</p>
        <pre class="brush: posh">import-module citrix
# Now our functions are loaded. Invocation options:
# assuming no clash, invoke with simple names
get-farm bleh
# load sharepoint module (it also has get-farm)
import-module sharepoint
# ok, sharepoint functions are loaded too, so we have two get-farm commands
# and the last loaded wins, so citrix get-farm is inaccessible through simple syntax, but...
# let's refer specifically to the citrix module function
citrix\get-farm
# and for sharepoint:
sharepoint\get-farm
# and thirdly, if you don't want to use the module qualifier (or "namespace") then you ALSO have the
# choice of applying a prefix on import - this is the primary use case for quick interactive use:
import-module citrix -prefix ctx
# now you can call functions like:
get-ctxfarm
# or even citrix\get-ctxfarm if you so felt like it, but redundant.
# same for sharepoint
import-module sharepoint -prefix sp
get-spfarm
</pre>
        <p>
Make sense so far? Unfortunately, as mentioned earlier, in v1.0 the module qualifier
(or "namespace") works ONLY for binary commands imported in a Snap-In DLL. Let’s see
how that works with get-childitem, a command from one of the preloaded Snap-Ins in
PowerShell:
</p>
        <pre class="brush: posh">gcm get-childitem | select pssnapin
</pre>
        <p>
outputs:<br /><br />
PSSnapIn<br />
--------<br />
Microsoft.PowerShell.Management 
</p>
Ergo, we invoke it like: <pre class="brush: posh">Microsoft.PowerShell.Management\get-childitem
# ... outputs file listing ...
</pre><h4>Module Aliasing
</h4><p>
Some modules may have longer names that you would be comfortable to type all the time.
Thankfully, there is a trick you can do that takes advantage of the fact that modules
can be nested. Let’s say you have a module from a vendor that is called something
like “Vendor.Division.Product” and it has a cmdlet in it called Get-Thing that happens
to clash with another Get-Thing you have loaded. Normally to disambiguate, you have
to type:
</p><pre class="brush: posh">import-module vendor.division.product
Vendor.Division.Product\Get-Thing
</pre><p>
…which is a bit annoying. Instead, wrap the initial import-module statement in a dynamic
module where you supply an explicit name for it, and import that instead ;-)
</p><pre class="brush: posh">new-module –name product { import-module vendor.division.product } | import-module
# you can now invoke the command like this:
product\get-thing
</pre><p>
Any modules that are imported inside a module have their commands automatically exported
as if they are part of the root module (unless you control visibility with export-modulemember).
Cool, eh?
</p><p>
Have fun!
</p><img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=ae63739d-54e0-47df-b8f9-19ceb1890f95" /></body>
      <title>PowerShell 2.0 CTP3: Modules, in Practice.</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,ae63739d-54e0-47df-b8f9-19ceb1890f95.aspx</guid>
      <link>http://www.nivot.org/2009/03/19/PowerShell20CTP3ModulesInPractice.aspx</link>
      <pubDate>Thu, 19 Mar 2009 15:20:46 GMT</pubDate>
      <description>&lt;p&gt;
There’s a bit of a flap going on now around the blogosphere as various vendors, eager
to get onto the PowerShell train, are doing the bare minimum to get their product
“powershellized.” No one has spent any time reading – or if they did, they weren’t
successful in trying to understand it – the &lt;a href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/cmdline_std.mspx" target="_blank"&gt;Microsoft
Command Line Standard&lt;/a&gt;. 
&lt;/p&gt;
&lt;h4&gt;Modules as Namespaces
&lt;/h4&gt;
&lt;p&gt;
That’s right, modules are not as crazy sounding as they seem. They can be used quite
simply to just group a load of functions together while allowing easy disambiguation
should there be a name collision with another function or cmdlet. It wasn’t always
this easy. 
&lt;h5&gt;Namespaces in PowerShell v1.0
&lt;/h5&gt;
&lt;p&gt;
In PowerShell v1.0 it was possible to load two snap-ins that contained identically
named commands. This causes PowerShell to spit out an error about ambiguous commands
should you try to invoke one. The answer to this was to get the containing snap-in
name, and prefix it to the cmdlet name using a backslash as a separator:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;$o = Pscx\New-Object Collections.Generic.Dictionary –Of String, Int
&lt;/pre&gt;
&lt;p&gt;
As you can see, this lets us call the hypothetical PowerShell Community Extensions
version of New-Object to create a generic type. If you want to call the original one,
you would have to prefix it like this:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;$o = Microsoft.PowerShell.Utility\New-Object Int[] 5
&lt;/pre&gt;
&lt;p&gt;
Blech - that’s a bit of a lengthy sentence, but the solution to this is to use an
alias. Aliases are found before Cmdlets in the search path:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;New-Alias New-Object Microsoft.PowerShell.Utility\New-Object
$o = New-Object Int[] 5 
&lt;/pre&gt;
&lt;p&gt;
The reason we need an alias here is because if you just typed the cmdlet without the
snap-in prefix, PowerShell v1.0 complains that it doesn’t know which one you want.
We forgot to add the mind reader snap-in!
&lt;/p&gt;
&lt;p&gt;
How about functions in PowerShell v1.0? If you dot source a ps1 file that contains
functions that already exist in the caller’s session, how do you disambiguate them?
Oops! You can’t. They are overwritten. Ouch. 
&lt;/p&gt;
&lt;p&gt;
You cannot use the namespace\ prefix for functions in v1 - the support is just not
there. However…
&lt;/p&gt;
&lt;h5&gt;Namespaces in PowerShell v2.0
&lt;/h5&gt;
&lt;p&gt;
Things are a lot better in this version. Let’s say you have two groups of functions
that you use in your business. One for your SharePoint farms, and another set for
your Citrix farms. Let’s ignore the perfectly acceptable idea of prefixing the noun
to differentiate for the moment and just imagine we have two ps1 files, containing
ideally named function with approved verb, simple noun:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;# sharepoint functions
function Get-Server {
   # ... gets sharepoint server
}
function Get-Farm {
   # ... gets sharepoint farm
}
&lt;/pre&gt;
&lt;p&gt;
And the second script:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;# citrix functions
function Get-Server {
    # ... gets citrix server
}
function Get-Farm {
    # ... gets citrix farm
}
&lt;/pre&gt;
&lt;p&gt;
If you tried to load these up with via a dot source, one after the other, the functions
from the second ps1 would overwrite the first lot. So this is where the wonder world
of modules is entered. First step:
&lt;/p&gt;
&lt;p&gt;
After renaming both ps1 files to use the psm1 extension instead, you have created
modules of the simplest form. Ignoring the details of how this is deployed (there
are several ways – documented on Microsoft and on many blogs, including this one),
let's look at how it's loaded and used:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;import-module citrix
# Now our functions are loaded. Invocation options:
# assuming no clash, invoke with simple names
get-farm bleh
# load sharepoint module (it also has get-farm)
import-module sharepoint
# ok, sharepoint functions are loaded too, so we have two get-farm commands
# and the last loaded wins, so citrix get-farm is inaccessible through simple syntax, but...
# let's refer specifically to the citrix module function
citrix\get-farm
# and for sharepoint:
sharepoint\get-farm
# and thirdly, if you don't want to use the module qualifier (or "namespace") then you ALSO have the
# choice of applying a prefix on import - this is the primary use case for quick interactive use:
import-module citrix -prefix ctx
# now you can call functions like:
get-ctxfarm
# or even citrix\get-ctxfarm if you so felt like it, but redundant.
# same for sharepoint
import-module sharepoint -prefix sp
get-spfarm
&lt;/pre&gt;
&lt;p&gt;
Make sense so far? Unfortunately, as mentioned earlier, in v1.0 the module qualifier
(or "namespace") works ONLY for binary commands imported in a Snap-In DLL. Let’s see
how that works with get-childitem, a command from one of the preloaded Snap-Ins in
PowerShell:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;gcm get-childitem | select pssnapin
&lt;/pre&gt;
&lt;p&gt;
outputs:&lt;br&gt;
&lt;br&gt;
PSSnapIn&lt;br&gt;
--------&lt;br&gt;
Microsoft.PowerShell.Management 
&lt;/p&gt;
Ergo, we invoke it like: &lt;pre class="brush: posh"&gt;Microsoft.PowerShell.Management\get-childitem
# ... outputs file listing ...
&lt;/pre&gt;
&lt;h4&gt;Module Aliasing
&lt;/h4&gt;
&lt;p&gt;
Some modules may have longer names that you would be comfortable to type all the time.
Thankfully, there is a trick you can do that takes advantage of the fact that modules
can be nested. Let’s say you have a module from a vendor that is called something
like “Vendor.Division.Product” and it has a cmdlet in it called Get-Thing that happens
to clash with another Get-Thing you have loaded. Normally to disambiguate, you have
to type:
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;import-module vendor.division.product
Vendor.Division.Product\Get-Thing
&lt;/pre&gt;
&lt;p&gt;
…which is a bit annoying. Instead, wrap the initial import-module statement in a dynamic
module where you supply an explicit name for it, and import that instead ;-)
&lt;/p&gt;
&lt;pre class="brush: posh"&gt;new-module –name product { import-module vendor.division.product } | import-module
# you can now invoke the command like this:
product\get-thing
&lt;/pre&gt;
&lt;p&gt;
Any modules that are imported inside a module have their commands automatically exported
as if they are part of the root module (unless you control visibility with export-modulemember).
Cool, eh?
&lt;/p&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=ae63739d-54e0-47df-b8f9-19ceb1890f95" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,ae63739d-54e0-47df-b8f9-19ceb1890f95.aspx</comments>
      <category>Cmdlets</category>
      <category>CTP3</category>
      <category>Modules</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=fc4e157a-1bcb-4b35-8934-1ec0abcdf526</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,fc4e157a-1bcb-4b35-8934-1ec0abcdf526.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,fc4e157a-1bcb-4b35-8934-1ec0abcdf526.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=fc4e157a-1bcb-4b35-8934-1ec0abcdf526</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>UPDATED 2009-03-11: BUGFIXES FOR CTP3! PLEASE RE-DOWNLOAD v0.2.1</strong>
        </p>
        <p>
One of the things I hear now and then is that while PowerShell the language can be
mastered with the requisite effort, the .NET namespace is considerable harder to get
a handle on. Wouldn’t it be nice if you could type things like:
</p>
        <p>
          <font size="3" face="Courier New">PS&gt; get-help -object [string]::format</font>
        </p>
        <p>
Since Functions take precedence over native Cmdlets in the command search order, the
first thing you might think is to create a function with the same name, get-help,
that can do this. The function itself would have the same parameters as the native
Cmdlet, and add one of its own: -object. If the arguments do not belong to the “object”
ParameterSet, then the function would splat (using the @ operator) the original arguments
to the native Cmdlet transparently and transfer control. The user is none the wiser
we had a quick peek at the arguments. So, before we run off duplicating a Cmdlet’s
surface through script, first stop, Command Proxies!
</p>
        <h4>Command Proxies
</h4>
        <p>
First off, required reading: <a href="http://blogs.msdn.com/powershell/archive/2009/01/04/extending-and-or-modifing-commands-with-proxies.aspx" target="_blank">Extending
and/or Modifying Commands with Proxies</a>. Ok, now that you’ve got read that entirely
and gotten it  out of the way, you understand that the [ProxyCommand]::Create(…)
method lets you automatically generate a function that delegates to a steppable pipeline
wrapping the original Cmdlet, right? What I did then is to pack all of these functions
into a psm1 module, create a nice psd1 <a href="http://www.nivot.org/2008/12/30/PowerShellCTP3AndModuleManifests.aspx" target="_blank">module
manifest</a> and away we go. 
</p>
        <h4>The ObjectHelp Get-Help Extension Module
</h4>
        <p>
So here’s a quick look at the help for my module, in friendly, easy to read Cmdlet
help style. The code for the PSM1 module file is way too large to dump here on my
blog like I would usually do, so it’s available at as an attachment at the foot of
the page. This help below is in a comment in the psm1 file itself. 
</p>
        <p>
        </p>
        <p>
    NAME<br />
    
<br />
        ObjectHelp Extensions Module 0.2 for PowerShell
2.0 CTP3<br />
     
<br />
    SYNOPSIS<br />
    
<br />
         Get-Help -Object allows you to display
usage and summary help for .NET Types and Members.<br />
         
<br />
    DETAILED DESCRIPTION<br />
    
<br />
        Get-Help -Object allows you to display
usage and summary help for .NET Types and Members.<br />
    
<br />
        If local documentation is not found and
the object vendor is Microsoft, you will be directed<br />
        to MSDN online to the correct page. If
the vendor is not Microsoft and vendor information<br />
        exists on the owning assembly, you will
be prompted to search for information using Microsoft<br />
        Live Search.<br />
     
<br />
    TODO<br />
     
<br />
         * localize strings into PSD1 file<br />
         * Implement caching in hashtables.
XMLDocuments are fat pigs.<br />
         * Support getting property/field
help<br />
         * PowerTab integration<br />
         * Test with Strict Parser<br />
             
<br />
    EXAMPLES<br /><br />
        # get help on a type<br />
        PS&gt; get-help -obj [int]<br /><br />
        # get help against live instances<br />
        PS&gt; $obj = new-object system.xml.xmldocument<br />
        PS&gt; get-help -obj $obj<br /><br />
        or even:<br />
        
<br />
        PS&gt; get-help -obj 42<br />
        
<br />
        # get help against methods<br />
        PS&gt; get-help -obj $obj.Load<br /><br />
        # explictly try msdn<br />
        PS&gt; get-help -obj [regex] -online<br /><br />
        # go to msdn for regex's members<br />
        PS&gt; get-help -obj [regex] -online -members<br /><br />
    CREDITS<br />
    
<br />
        Author: Oisin Grehan (MVP)<br />
        Blog  : http://www.nivot.org/<br />
    
<br />
        Have fun!  
<br /></p>
        <h4>Usage Examples
</h4>
        <p>
So what does it actually look like when you call help? If the help is available locally,
it is displayed inline in the console (or ISE). <strong>Help for all types in MSCorlib
and System is pre-cached</strong>. Any other help for types in assemblies belonging
to the BCL (Base Class Libraries – effectively the stock .NET assemblies) will be
loaded on-demand. This typically takes just a few seconds and will cached for the
rest of your session.
</p>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/CTP3ProxyCommandTrick.NETTypesandMembers_115F7/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/CTP3ProxyCommandTrick.NETTypesandMembers_115F7/image_thumb.png" width="690" height="525" />
          </a>
        </p>
        <h4>TODO and BUGS
</h4>
        <p>
Right now, it cannot deal with properties. That is to say, trying:
</p>
        <p>
          <font size="3" face="Courier New">PS&gt; get-help –object $s.length </font>
        </p>
        <p>
where $s is a string, will get help on the property _type_, not the property itself.
I have some ideas to get around this, so if you can wait for 0.3, I’d be happy. Of
course you can wait. You have no choice. :D
</p>
        <h4>Download
</h4>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:193d6938-7635-445e-a24b-8c00fc96edd2" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/CTP3ProxyCommandTrick.NETTypesandMembers_C922/ObjectHelp-0.2.1.zip" target="_blank">ObjectHelp-0.2.1.zip</a>
          </div>
        </div>
        <p>
The two files come in a zip file. Unzip this file to ~\documents\windowspowershell\modules\objecthelp\
where ~ is your home directory. On vista/win7 this would be c:\users\username. On
XP, it would be c:\documents and settings\username. To load it, just execute:
</p>
        <p>
          <font size="3" face="Courier New">PS&gt; import-module objecthelp</font>
        </p>
        <p>
That’s it! Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=fc4e157a-1bcb-4b35-8934-1ec0abcdf526" />
      </body>
      <title>CTP3 ProxyCommand Tricks: Extending Get-Help to cover .NET Types and Members</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,fc4e157a-1bcb-4b35-8934-1ec0abcdf526.aspx</guid>
      <link>http://www.nivot.org/2009/03/10/CTP3ProxyCommandTricksExtendingGetHelpToCoverNETTypesAndMembers.aspx</link>
      <pubDate>Tue, 10 Mar 2009 04:08:54 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;UPDATED 2009-03-11: BUGFIXES FOR CTP3! PLEASE RE-DOWNLOAD v0.2.1&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
One of the things I hear now and then is that while PowerShell the language can be
mastered with the requisite effort, the .NET namespace is considerable harder to get
a handle on. Wouldn’t it be nice if you could type things like:
&lt;/p&gt;
&lt;p&gt;
&lt;font size="3" face="Courier New"&gt;PS&amp;gt; get-help -object [string]::format&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Since Functions take precedence over native Cmdlets in the command search order, the
first thing you might think is to create a function with the same name, get-help,
that can do this. The function itself would have the same parameters as the native
Cmdlet, and add one of its own: -object. If the arguments do not belong to the “object”
ParameterSet, then the function would splat (using the @ operator) the original arguments
to the native Cmdlet transparently and transfer control. The user is none the wiser
we had a quick peek at the arguments. So, before we run off duplicating a Cmdlet’s
surface through script, first stop, Command Proxies!
&lt;/p&gt;
&lt;h4&gt;Command Proxies
&lt;/h4&gt;
&lt;p&gt;
First off, required reading: &lt;a href="http://blogs.msdn.com/powershell/archive/2009/01/04/extending-and-or-modifing-commands-with-proxies.aspx" target="_blank"&gt;Extending
and/or Modifying Commands with Proxies&lt;/a&gt;. Ok, now that you’ve got read that entirely
and gotten it&amp;nbsp; out of the way, you understand that the [ProxyCommand]::Create(…)
method lets you automatically generate a function that delegates to a steppable pipeline
wrapping the original Cmdlet, right? What I did then is to pack all of these functions
into a psm1 module, create a nice psd1 &lt;a href="http://www.nivot.org/2008/12/30/PowerShellCTP3AndModuleManifests.aspx" target="_blank"&gt;module
manifest&lt;/a&gt; and away we go. 
&lt;/p&gt;
&lt;h4&gt;The ObjectHelp Get-Help Extension Module
&lt;/h4&gt;
&lt;p&gt;
So here’s a quick look at the help for my module, in friendly, easy to read Cmdlet
help style. The code for the PSM1 module file is way too large to dump here on my
blog like I would usually do, so it’s available at as an attachment at the foot of
the page. This help below is in a comment in the psm1 file itself. 
&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectHelp Extensions Module 0.2 for PowerShell
2.0 CTP3&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SYNOPSIS&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-Help -Object allows you to display
usage and summary help for .NET Types and Members.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DETAILED DESCRIPTION&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-Help -Object allows you to display
usage and summary help for .NET Types and Members.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If local documentation is not found and
the object vendor is Microsoft, you will be directed&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to MSDN online to the correct page. If
the vendor is not Microsoft and vendor information&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exists on the owning assembly, you will
be prompted to search for information using Microsoft&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Live Search.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; TODO&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * localize strings into PSD1 file&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Implement caching in hashtables.
XMLDocuments are fat pigs.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Support getting property/field
help&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * PowerTab integration&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Test with Strict Parser&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; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; EXAMPLES&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # get help on a type&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; get-help -obj [int]&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # get help against live instances&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; $obj = new-object system.xml.xmldocument&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; get-help -obj $obj&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or even:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; get-help -obj 42&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # get help against methods&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; get-help -obj $obj.Load&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # explictly try msdn&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; get-help -obj [regex] -online&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # go to msdn for regex's members&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PS&amp;gt; get-help -obj [regex] -online -members&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; CREDITS&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Author: Oisin Grehan (MVP)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blog&amp;nbsp; : http://www.nivot.org/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have fun!&amp;nbsp; 
&lt;br&gt;
&lt;/p&gt;
&lt;h4&gt;Usage Examples
&lt;/h4&gt;
&lt;p&gt;
So what does it actually look like when you call help? If the help is available locally,
it is displayed inline in the console (or ISE). &lt;strong&gt;Help for all types in MSCorlib
and System is pre-cached&lt;/strong&gt;. Any other help for types in assemblies belonging
to the BCL (Base Class Libraries – effectively the stock .NET assemblies) will be
loaded on-demand. This typically takes just a few seconds and will cached for the
rest of your session.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/CTP3ProxyCommandTrick.NETTypesandMembers_115F7/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/CTP3ProxyCommandTrick.NETTypesandMembers_115F7/image_thumb.png" width="690" height="525"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;h4&gt;TODO and BUGS
&lt;/h4&gt;
&lt;p&gt;
Right now, it cannot deal with properties. That is to say, trying:
&lt;/p&gt;
&lt;p&gt;
&lt;font size="3" face="Courier New"&gt;PS&amp;gt; get-help –object $s.length &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
where $s is a string, will get help on the property _type_, not the property itself.
I have some ideas to get around this, so if you can wait for 0.3, I’d be happy. Of
course you can wait. You have no choice. :D
&lt;/p&gt;
&lt;h4&gt;Download
&lt;/h4&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:193d6938-7635-445e-a24b-8c00fc96edd2" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/CTP3ProxyCommandTrick.NETTypesandMembers_C922/ObjectHelp-0.2.1.zip" target="_blank"&gt;ObjectHelp-0.2.1.zip&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
The two files come in a zip file. Unzip this file to ~\documents\windowspowershell\modules\objecthelp\
where ~ is your home directory. On vista/win7 this would be c:\users\username. On
XP, it would be c:\documents and settings\username. To load it, just execute:
&lt;/p&gt;
&lt;p&gt;
&lt;font size="3" face="Courier New"&gt;PS&amp;gt; import-module objecthelp&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
That’s it! Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=fc4e157a-1bcb-4b35-8934-1ec0abcdf526" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,fc4e157a-1bcb-4b35-8934-1ec0abcdf526.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>Modules</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=c5db121f-cd3d-4a29-9516-737d8094005e</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,c5db121f-cd3d-4a29-9516-737d8094005e.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,c5db121f-cd3d-4a29-9516-737d8094005e.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=c5db121f-cd3d-4a29-9516-737d8094005e</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Some of you may have heard that CTP3 has support for transferring files from remote
servers using BITS (<a href="http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service" target="_blank">Background
Intelligent Transfer Service</a>) and quite possibly had a little dig around for it.
It’s not easy to find as using “get-help BITS” will not return any help unless you’ve
already loaded the module. Not a great win for discoverability, but hey, sometimes
you just have to read the manual, expletive deleted. So, lets have a quick look at
how this works. 
</p>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_thumb.png" width="527" height="365" />
          </a>
        </p>
        <p>
So, ok, we can see we’ve got a module for <strong>FileTransfer</strong> (BITS), but
where did this come from? Take a peek into $pshome\Modules to find out. This is the
location for system-wide (global) modules. It rests under $PSHome, which is the home
for PowerShell, in $env:systemroot\windowspowershell\v1.0. 
</p>
        <p style="padding-bottom: 5px; background-color: lightgray; margin: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px">
Yes, even PowerShell v2 lives there. This is one of those unfortunate things whereby
the team decided early on that they would support side-by-side versions of PowerShell,
implying that v2 might not be backwards compatible with v1. This is reflected also
in the choice of file extension: ps1. The extension ps2 would have been used for v2.
This was probably a poor show of faith in their own abilities to design such a great
version one product, because as it turns out, v1.0 was such an excellent release that
they were able to build on it for v2 without compromising, or breaking backwards compatibility
(apart from a couple of minor edge cases, mainly bugfixes). So, the end result is
that future versions of PowerShell will inherit the $pshome, pay a little inheritance
tax and hopefully avoid foreclosure :).
</p>
        <p>
The files in the FileTransfer module directory are laid out as follows: 
</p>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_thumb_1.png" width="621" height="248" />
          </a>
        </p>
        <p>
          <em>(Hey look! another built-in module – <strong>PSDiagnostics</strong> - I’ll leave
that one for you guys to explore).</em>
        </p>
        <p>
So, there are four files there. A ps1xml Format file, which tells PowerShell how to
textually render the .NET objects returned by the Cmdlets. A psd1 <a href="http://www.nivot.org/2008/12/30/PowerShellCTP3AndModuleManifests.aspx" target="_blank">Module
Manifest</a> file, which tells PowerShell what files comprise the Module and a binary
DLL which in this case does NOT contain the Cmdlets, but instead is what’s called
an “Interop Assembly.”  (sometimes known as Primary Interop Assemblies or PIAs,
read about them here: <a title="Primary Interop Assemblies" href="http://msdn.microsoft.com/en-us/library/aax7sdch.aspx">Primary
Interop Assemblies</a> – there are subtle differences between IAs and PIAs, but not
enough to warrant discussion here). Essentially this DLL lets .NET, and by extension,
PowerShell, talk to the native COM APIs that wrap the BITS services on XP,Vista,Win7,Win
2003 and Win 2008. Lets take a peek into the Module Manifest:
</p>
        <!-- Stylesheet link -->
        <link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" />
        <!-- Code -->
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span>@{   </span>
              </span>
            </li>
            <li>
              <span>GUID=</span>
              <span class="string">"{8FA5064B-8479-4c5c-86EA-0D311FE48875}"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>Author=</span>
              <span class="string">"Microsoft Corporation"</span>
              <span>  </span>
            </li>
            <li>
              <span>CompanyName=</span>
              <span class="string">"Microsoft Corporation"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>Copyright=</span>
              <span class="string">"c Microsoft Corporation. All rights reserved."</span>
              <span>  </span>
            </li>
            <li>
              <span>ModuleVersion=</span>
              <span class="string">"1.0.0.0"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>Description=</span>
              <span class="string">"Powershell File Transfer Module"</span>
              <span>  </span>
            </li>
            <li>
              <span>PowerShellVersion=</span>
              <span class="string">"2.0"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>CLRVersion=</span>
              <span class="string">"2.0"</span>
              <span>  </span>
            </li>
            <li>
              <span>
                <strong>NestedModules</strong>=</span>
              <span class="string">"Microsoft.BackgroundIntelligentTransfer.Management"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>FormatsToProcess=</span>
              <span class="string">"FileTransfer.Format.ps1xml"</span>
              <span>  </span>
            </li>
            <li>
              <span>
                <strong>RequiredAssemblies</strong>=</span>
              <span class="builtin">Join-Path</span>
              <span> </span>
              <span class="variable">$psScriptRoot</span>
              <span> </span>
              <span class="string">"Microsoft.BackgroundIntelligentTransfer.Management.Interop.dll"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>}  </span>
            </li>
          </ol>
        </div>
        <p>
If it looks like I just dumped a Hashtable out, you’re right. That’s all a manifest
is: a Hashtable. Of course, the key names are important and in this case, lets take
a look at two in particular, <strong>NestedModules</strong> and <strong>RequiredAssemblies</strong>.
</p>
        <p>
The RequiredAssemblies key is responsible for actively loading .NET assemblies containing
standard .NET types. It does not extract Providers and Cmdlets and add them to the
runspace; this is what the other key, NestedModules, does. Like I said already, this
DLL is the interop assembly. So where is the NestedModules loading that other module
from? I don’t see any other DLLs in the directory, and I <em>know</em> there are no
Cmdlets in that interop assembly. Lets take a peek at one of the Cmdlets itself and
find out:
</p>
        <p>
          <a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_8.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_thumb_3.png" width="575" height="526" />
          </a>
        </p>
        <p>
        </p>
        <p>
Aha, it’s reading it from the GAC. When PowerShell was installed, it must have installed
this DLL there. This is the DLL that contains our Cmdlets. I know this is true because
I used one of the Cmdlets to tell me where it lives. “GCM” is the alias for Get-Command
which will get us metadata about any given command in PowerShell (including functions
– new to v2).
</p>
        <p>
So, lets use a one-liner to get the names of all the Cmdlets in this module, and the
synopsis summary for the help:
</p>
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span>gcm -module filetransfer | % { </span>
                <span class="variable">$_</span>
                <span> |
select name, @{Name=</span>
                <span class="string">"Help"</span>
                <span>;Expression={&amp; </span>
                <span class="variable">$_</span>
                <span> -?
| select -expand synopsis }}} | convertto-html –fragment  </span>
              </span>
            </li>
          </ol>
        </div>
        <p>
This yields the following:
</p>
        <table>
          <colgroup>
            <col />
            <col />
          </colgroup>
          <tbody>
            <tr>
              <th>
Name</th>
              <th>
Help</th>
            </tr>
            <tr>
              <td>
Add-FileTransfer</td>
              <td>
Adds one or more files to an existing Background Intelligent Transfer Service (BITS)
t ransfer job.</td>
            </tr>
            <tr>
              <td>
Clear-FileTransfer</td>
              <td>
Cancels a Background Intelligent Transfer Service (BITS) transfer job.</td>
            </tr>
            <tr>
              <td>
Complete-FileTransfer</td>
              <td>
Completes a Background Intelligent Transfer Service (BITS) transfer job.</td>
            </tr>
            <tr>
              <td>
Get-FileTransfer</td>
              <td>
Retrieves the associated BitsJob object for an existing Background Intelligent Transfe
r Service (BITS) transfer job.</td>
            </tr>
            <tr>
              <td>
New-FileTransfer</td>
              <td>
Creates a new Background Intelligent Transfer Service (BITS) transfer job.</td>
            </tr>
            <tr>
              <td>
Resume-FileTransfer</td>
              <td>
Resumes a Background Intelligent Transfer Service (BITS) transfer job.</td>
            </tr>
            <tr>
              <td>
Set-FileTransfer</td>
              <td>
Modifies the properties of an existing Business Intelligent Transfer Service (BITS)
tr ansfer job.</td>
            </tr>
            <tr>
              <td>
Suspend-FileTransfer</td>
              <td>
Suspends a Background Intelligent Transfer Service (BITS) transfer job.</td>
            </tr>
          </tbody>
        </table>
        <p>
I guess this covers it for the moment. Going into a full discussion about how BITS
actually works is worth another post in itself. Suffice it to say, there are plenty
of examples in the help itself. Just run:
</p>
        <p>
          <strong>get-help add-filetransfer –example | more</strong>
        </p>
        <p>
To see an example on how to use the Cmdlet (or any of the others). The team have done
a good job here.
</p>
        <p>
Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=c5db121f-cd3d-4a29-9516-737d8094005e" />
      </body>
      <title>Anatomy of a PowerShell Module: The FileTransfer (BITS) Module</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,c5db121f-cd3d-4a29-9516-737d8094005e.aspx</guid>
      <link>http://www.nivot.org/2009/02/10/AnatomyOfAPowerShellModuleTheFileTransferBITSModule.aspx</link>
      <pubDate>Tue, 10 Feb 2009 18:38:27 GMT</pubDate>
      <description>&lt;p&gt;
Some of you may have heard that CTP3 has support for transferring files from remote
servers using BITS (&lt;a href="http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service" target="_blank"&gt;Background
Intelligent Transfer Service&lt;/a&gt;) and quite possibly had a little dig around for it.
It’s not easy to find as using “get-help BITS” will not return any help unless you’ve
already loaded the module. Not a great win for discoverability, but hey, sometimes
you just have to read the manual, expletive deleted. So, lets have a quick look at
how this works. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_thumb.png" width="527" height="365"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
So, ok, we can see we’ve got a module for &lt;strong&gt;FileTransfer&lt;/strong&gt; (BITS), but
where did this come from? Take a peek into $pshome\Modules to find out. This is the
location for system-wide (global) modules. It rests under $PSHome, which is the home
for PowerShell, in $env:systemroot\windowspowershell\v1.0. 
&lt;/p&gt;
&lt;p style="padding-bottom: 5px; background-color: lightgray; margin: 20px; padding-left: 5px; padding-right: 5px; padding-top: 5px"&gt;
Yes, even PowerShell v2 lives there. This is one of those unfortunate things whereby
the team decided early on that they would support side-by-side versions of PowerShell,
implying that v2 might not be backwards compatible with v1. This is reflected also
in the choice of file extension: ps1. The extension ps2 would have been used for v2.
This was probably a poor show of faith in their own abilities to design such a great
version one product, because as it turns out, v1.0 was such an excellent release that
they were able to build on it for v2 without compromising, or breaking backwards compatibility
(apart from a couple of minor edge cases, mainly bugfixes). So, the end result is
that future versions of PowerShell will inherit the $pshome, pay a little inheritance
tax and hopefully avoid foreclosure :).
&lt;/p&gt;
&lt;p&gt;
The files in the FileTransfer module directory are laid out as follows: 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_thumb_1.png" width="621" height="248"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;(Hey look! another built-in module – &lt;strong&gt;PSDiagnostics&lt;/strong&gt; - I’ll leave
that one for you guys to explore).&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
So, there are four files there. A ps1xml Format file, which tells PowerShell how to
textually render the .NET objects returned by the Cmdlets. A psd1 &lt;a href="http://www.nivot.org/2008/12/30/PowerShellCTP3AndModuleManifests.aspx" target="_blank"&gt;Module
Manifest&lt;/a&gt; file, which tells PowerShell what files comprise the Module and a binary
DLL which in this case does NOT contain the Cmdlets, but instead is what’s called
an “Interop Assembly.”&amp;nbsp; (sometimes known as Primary Interop Assemblies or PIAs,
read about them here: &lt;a title="Primary Interop Assemblies" href="http://msdn.microsoft.com/en-us/library/aax7sdch.aspx"&gt;Primary
Interop Assemblies&lt;/a&gt; – there are subtle differences between IAs and PIAs, but not
enough to warrant discussion here). Essentially this DLL lets .NET, and by extension,
PowerShell, talk to the native COM APIs that wrap the BITS services on XP,Vista,Win7,Win
2003 and Win 2008. Lets take a peek into the Module Manifest:
&lt;/p&gt;
&lt;!-- Stylesheet link --&gt;
&lt;link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css"&gt;
&lt;!-- Code --&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span&gt;@{&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;GUID=&lt;/span&gt;&lt;span class="string"&gt;"{8FA5064B-8479-4c5c-86EA-0D311FE48875}"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;Author=&lt;/span&gt;&lt;span class="string"&gt;"Microsoft Corporation"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;CompanyName=&lt;/span&gt;&lt;span class="string"&gt;"Microsoft Corporation"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;Copyright=&lt;/span&gt;&lt;span class="string"&gt;"c Microsoft Corporation. All rights reserved."&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;ModuleVersion=&lt;/span&gt;&lt;span class="string"&gt;"1.0.0.0"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;Description=&lt;/span&gt;&lt;span class="string"&gt;"Powershell File Transfer Module"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;PowerShellVersion=&lt;/span&gt;&lt;span class="string"&gt;"2.0"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;CLRVersion=&lt;/span&gt;&lt;span class="string"&gt;"2.0"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&lt;strong&gt;NestedModules&lt;/strong&gt;=&lt;/span&gt;&lt;span class="string"&gt;"Microsoft.BackgroundIntelligentTransfer.Management"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;FormatsToProcess=&lt;/span&gt;&lt;span class="string"&gt;"FileTransfer.Format.ps1xml"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&lt;strong&gt;RequiredAssemblies&lt;/strong&gt;=&lt;/span&gt;&lt;span class="builtin"&gt;Join-Path&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="variable"&gt;$psScriptRoot&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="string"&gt;"Microsoft.BackgroundIntelligentTransfer.Management.Interop.dll"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;}&amp;nbsp; &lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
If it looks like I just dumped a Hashtable out, you’re right. That’s all a manifest
is: a Hashtable. Of course, the key names are important and in this case, lets take
a look at two in particular, &lt;strong&gt;NestedModules&lt;/strong&gt; and &lt;strong&gt;RequiredAssemblies&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
The RequiredAssemblies key is responsible for actively loading .NET assemblies containing
standard .NET types. It does not extract Providers and Cmdlets and add them to the
runspace; this is what the other key, NestedModules, does. Like I said already, this
DLL is the interop assembly. So where is the NestedModules loading that other module
from? I don’t see any other DLLs in the directory, and I &lt;em&gt;know&lt;/em&gt; there are no
Cmdlets in that interop assembly. Lets take a peek at one of the Cmdlets itself and
find out:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.nivot.org/content/binary/WindowsLiveWriter/Pow.0CTP3andthebuiltinFileTransferModule_ACD3/image_thumb_3.png" width="575" height="526"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Aha, it’s reading it from the GAC. When PowerShell was installed, it must have installed
this DLL there. This is the DLL that contains our Cmdlets. I know this is true because
I used one of the Cmdlets to tell me where it lives. “GCM” is the alias for Get-Command
which will get us metadata about any given command in PowerShell (including functions
– new to v2).
&lt;/p&gt;
&lt;p&gt;
So, lets use a one-liner to get the names of all the Cmdlets in this module, and the
synopsis summary for the help:
&lt;/p&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span&gt;gcm -module filetransfer | % { &lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt; |
select name, @{Name=&lt;/span&gt;&lt;span class="string"&gt;"Help"&lt;/span&gt;&lt;span&gt;;Expression={&amp;amp; &lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt; -?
| select -expand synopsis }}} | convertto-html –fragment&amp;nbsp; &lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
This yields the following:
&lt;/p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col&gt;
&lt;col&gt;
&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;
Name&lt;/th&gt;
&lt;th&gt;
Help&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Add-FileTransfer&lt;/td&gt;
&lt;td&gt;
Adds one or more files to an existing Background Intelligent Transfer Service (BITS)
t ransfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Clear-FileTransfer&lt;/td&gt;
&lt;td&gt;
Cancels a Background Intelligent Transfer Service (BITS) transfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Complete-FileTransfer&lt;/td&gt;
&lt;td&gt;
Completes a Background Intelligent Transfer Service (BITS) transfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-FileTransfer&lt;/td&gt;
&lt;td&gt;
Retrieves the associated BitsJob object for an existing Background Intelligent Transfe
r Service (BITS) transfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-FileTransfer&lt;/td&gt;
&lt;td&gt;
Creates a new Background Intelligent Transfer Service (BITS) transfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Resume-FileTransfer&lt;/td&gt;
&lt;td&gt;
Resumes a Background Intelligent Transfer Service (BITS) transfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-FileTransfer&lt;/td&gt;
&lt;td&gt;
Modifies the properties of an existing Business Intelligent Transfer Service (BITS)
tr ansfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Suspend-FileTransfer&lt;/td&gt;
&lt;td&gt;
Suspends a Background Intelligent Transfer Service (BITS) transfer job.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
I guess this covers it for the moment. Going into a full discussion about how BITS
actually works is worth another post in itself. Suffice it to say, there are plenty
of examples in the help itself. Just run:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;get-help add-filetransfer –example | more&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
To see an example on how to use the Cmdlet (or any of the others). The team have done
a good job here.
&lt;/p&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=c5db121f-cd3d-4a29-9516-737d8094005e" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,c5db121f-cd3d-4a29-9516-737d8094005e.aspx</comments>
      <category>.NET</category>
      <category>BITS</category>
      <category>Cmdlets</category>
      <category>CTP3</category>
      <category>Modules</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=f33b33fb-273a-4c45-9695-cdcc0c768aaf</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,f33b33fb-273a-4c45-9695-cdcc0c768aaf.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,f33b33fb-273a-4c45-9695-cdcc0c768aaf.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=f33b33fb-273a-4c45-9695-cdcc0c768aaf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It’s been quite a few years -- November 14, 2006 to be exact -- since the final release
of <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell</a> 1.0.
Let’s see what the <a href="http://blogs.msdn.com/powershell" target="_blank">lazy
buggers</a> have been up to since then. Only kidding, they’re far from lazy; we’ve
gained an extra one hundred and six new cmdlets, moving from 131 to 237. We’ve also
gained another provider, WSManProvider which lets you explore and manipulate the WS-Man
configuration. Finally, the number of public Types (.NET classes usable by 3rd parties
to extend PowerShell) has increased from 447 to 749. So how do I know all this? Well,
some months ago I wrote a suite of build analysis Cmdlets for examining the assemblies
that comprise PowerShell. In its current form it’s of very little use to 3rd parties,
but I’ve had some requests to open it up and allow it to analyze any binary modules
and snap-ins, which is a good idea I think. Watch this space. Anyway, I’m going to
dump out some interest information on the differences between v1.0 and v2.0 CTP3,
along with the one-liners I’m using to generate the information. 
</p>
        <p>
          <em>
            <strong>update feb 5</strong>: added breaking changes</em>
        </p>
        <h4>
          <b>Breaking Changes to Windows PowerShell 1.0</b>
          <u>
          </u>
        </h4>
        <p>
          <u>
          </u>
        </p>
        <p>
The following changes in Windows PowerShell V2.0 CTP3 might prevent features designed
for Windows PowerShell 1.0 from working correctly.<u></u></p>
        <ul>
          <ul>
            <li>
              <div align="left">The value of the <b>PowerShellVersion</b> registry entry in HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine
has been changed to <b>2.0</b>.
</div>
            </li>
            <li>
              <div align="left">New cmdlets and variables have been added. These are listed below.
These new elements might conflict with variables and functions in profiles and scripts.
</div>
            </li>
            <li>
              <div align="left">
                <b>-</b>IEQ operator does a case insensitive comparison on characters.
</div>
            </li>
            <li>
              <div align="left">Get-Command gets functions along with cmdlets by default. 
</div>
            </li>
            <li>
              <div align="left">Any native command that generates a user interface blocks if it
is pipelined to the Out-Host cmdlet.
</div>
            </li>
            <li>
              <div align="left">Added new language keywords: <b>Begin</b>, <strong>Process, </strong>and<strong> End</strong>.
Any commands called <b>begin</b>, <b>process</b> or <b>end</b> are interpreted as
language keywords and might result in parsing errors. 
</div>
            </li>
            <li>
              <div align="left">Cmdlet name resolution has changed. In Windows PowerShell 1.0, a
runtime error was generated when two Windows PowerShell snap-ins exported cmdlets
with the same name. In Windows PowerShell V2, the last cmdlet loaded is the one that
is executed if the cmdlet name is not qualified by a snap-in name.
</div>
            </li>
            <li>
              <div align="left">Terminating errors that are thrown in a pipeline do not terminate
the pipeline. Instead, they are written to the host. 
</div>
            </li>
            <li>
              <div align="left">A function called with '-?' parameter gets the help topic for the
function, if one is included in the function. 
</div>
            </li>
          </ul>
        </ul>
        <p>
There are no changes to Cmdlets other than Get-Command’s –PSSnapin parameter is now
an alias to a –Module parameter. This reflects the move away from administrator-installed
snap-ins, and towards the friendlier Module system. For all intents and purposes,
you can treat v1 snapins as modules as load them as such with the Import-Module Cmdlet.
</p>
        <h4>New Cmdlets
</h4>
        <p>
Here are the new Cmdlets, sorted by noun and alongside the textual synopsis is one
is present in the CTP3 help, or the syntax if there is no help. The command I ran
to generate this was:
</p>
        <p>
          <!-- Stylesheet link -->
        </p>
        <link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" />
        <!-- Code -->
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span>compare-psbuildinfo (import-psbuildinfo .\rtm-6-0-6000-16386.psbuild)
(import-psbuildinfo .\win7beta1-6-1-7000-0.psbuild) | ? {</span>
                <span class="variable">$_</span>
                <span>.diff
-eq </span>
                <span class="string">"Added"</span>
                <span>} | sort noun | % { </span>
                <span class="variable">$_</span>
                <span> |
add-member -name Synopsis -member noteproperty -value (&amp; </span>
                <span class="variable">$_</span>
                <span>.name
-?</span>
                <span class="variable">|select</span>
                <span> -expand synopsis) -passthru }
| select name,synopsis | convertto-html -fragment &gt; new-cmdlets.htm  </span>
              </span>
            </li>
          </ol>
        </div>
        <p>
        </p>
        <style type="text/css">
          <!--
#cmdlets tr td { vertical-align: top; border-top: 1px solid gray; text-align: left; }
-->
        </style>
        <table id="cmdlets">
          <colgroup>
            <col />
            <col />
          </colgroup>
          <tbody>
            <tr>
              <th>
Name</th>
              <th>
Synopsis</th>
            </tr>
            <tr>
              <td>
Invoke-Command</td>
              <td>
Runs commands on local and remote computers.</td>
            </tr>
            <tr>
              <td>
Add-Computer</td>
              <td>
Adds computers to a domain or workgroup.</td>
            </tr>
            <tr>
              <td>
Remove-Computer</td>
              <td>
Removes computers from workgroups or domains.</td>
            </tr>
            <tr>
              <td>
Rename-Computer</td>
              <td>
Renames a computer.</td>
            </tr>
            <tr>
              <td>
Restore-Computer</td>
              <td>
Starts a system restore on the local computer.</td>
            </tr>
            <tr>
              <td>
Checkpoint-Computer</td>
              <td>
Creates a system restore point on the local computer.</td>
            </tr>
            <tr>
              <td>
Restart-Computer</td>
              <td>
Restarts ("reboots") the operating system on local and remote computers.</td>
            </tr>
            <tr>
              <td>
Stop-Computer</td>
              <td>
Stops (shuts down) local and remote computers.</td>
            </tr>
            <tr>
              <td>
Reset-ComputerMachinePassword</td>
              <td>
Resets the machine account password for the computer.</td>
            </tr>
            <tr>
              <td>
Disable-ComputerRestore</td>
              <td>
Disables the System Restore feature on the specified file system drive.</td>
            </tr>
            <tr>
              <td>
Enable-ComputerRestore</td>
              <td>
Enables the System Restore feature on the specified file system drive.</td>
            </tr>
            <tr>
              <td>
Get-ComputerRestorePoint</td>
              <td>
Gets the restore points on the local computer.</td>
            </tr>
            <tr>
              <td>
Test-ComputerSecureChannel</td>
              <td>
Test-ComputerSecureChannel [-Repair] [-Server &lt;String&gt;] [-Verbose] [-Debug]
[-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] [-WhatIf] [-Confirm] 
</td>
            </tr>
            <tr>
              <td>
Test-Connection</td>
              <td>
Sends ICMP echo request packets ("pings") to one or more computers.</td>
            </tr>
            <tr>
              <td>
Export-Counter</td>
              <td>
The Export-Counter cmdlet takes PerformanceCounterSampleSet objects and exports them
as counter log files.</td>
            </tr>
            <tr>
              <td>
Import-Counter</td>
              <td>
Imports performance counter log files (.blg, .csv, .tsv) and creates the objects that
represent each counter sample in the log.</td>
            </tr>
            <tr>
              <td>
Get-Counter</td>
              <td>
Gets performance counter data from local and remote computers.</td>
            </tr>
            <tr>
              <td>
ConvertFrom-Csv</td>
              <td>
Converts object properties in CSV format into CSV versions of the original objects.</td>
            </tr>
            <tr>
              <td>
ConvertTo-Csv</td>
              <td>
Converts .NET objects into a series of comma-separated, variable-length (CSV) strings.</td>
            </tr>
            <tr>
              <td>
Register-EngineEvent</td>
              <td>
Register-EngineEvent [-SourceIdentifier] &lt;String&gt; [[-Action] &lt;ScriptBlock&gt;]
[-MessageData &lt;PSObject&gt;] [-SupportEvent] [-Forward] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Unregister-Event</td>
              <td>
Unregister-Event [-SourceIdentifier] &lt;String&gt; [-Force] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] [-WhatIf] [-Confirm] Unregister-Event [-SubscriptionId] &lt;Int32&gt;
[-Force] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] [-WhatIf] [-Confirm] 
</td>
            </tr>
            <tr>
              <td>
New-Event</td>
              <td>
New-Event [-SourceIdentifier] &lt;String&gt; [[-Sender] &lt;PSObject&gt;] [[-EventArguments]
&lt;PSObject[]&gt;] [[-MessageData] &lt;PSObject&gt;] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Remove-Event</td>
              <td>
Remove-Event [-SourceIdentifier] &lt;String&gt; [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] [-WhatIf] [-Confirm] Remove-Event [-EventIdentifier] &lt;Int32&gt;
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] [-WhatIf] [-Confirm] 
</td>
            </tr>
            <tr>
              <td>
Wait-Event</td>
              <td>
Wait-Event [[-SourceIdentifier] &lt;String&gt;] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Get-Event</td>
              <td>
Get-Event [[-SourceIdentifier] &lt;String&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Show-EventLog</td>
              <td>
Displays the event logs of the local or a remote computer in Event Viewer.</td>
            </tr>
            <tr>
              <td>
New-EventLog</td>
              <td>
Creates a new event log and a new event source on a local or remote computer.</td>
            </tr>
            <tr>
              <td>
Remove-EventLog</td>
              <td>
Deletes an event log or unregisters an event source.</td>
            </tr>
            <tr>
              <td>
Clear-EventLog</td>
              <td>
Deletes all entries from specified event logs on the local or remote computers.</td>
            </tr>
            <tr>
              <td>
Write-EventLog</td>
              <td>
Writes an event to an event log.</td>
            </tr>
            <tr>
              <td>
Limit-EventLog</td>
              <td>
Sets the event log properties that limit the size of the event log and the age of
its entries.</td>
            </tr>
            <tr>
              <td>
Get-EventSubscriber</td>
              <td>
Get-EventSubscriber [[-SourceIdentifier] &lt;String&gt;] [-Force] [-Verbose] [-Debug]
[-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Export-FormatData</td>
              <td>
Export-FormatData [-InputObject &lt;ExtendedTypeDefinition[]&gt;] [-FilePath &lt;String&gt;]
[-Force] [-NoClobber] [-IncludeScriptBlock] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Get-FormatData</td>
              <td>
Get-FormatData [[-TypeName] &lt;String[]&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Out-GridView</td>
              <td>
Sends output to an interactive table in a separate window.</td>
            </tr>
            <tr>
              <td>
Clear-History</td>
              <td>
Deletes entries from the command history.</td>
            </tr>
            <tr>
              <td>
Get-HotFix</td>
              <td>
Gets the QFE updates that have been applied to the local and remote computers.</td>
            </tr>
            <tr>
              <td>
Stop-Job</td>
              <td>
Stops a Windows PowerShell background job.</td>
            </tr>
            <tr>
              <td>
Wait-Job</td>
              <td>
Suppresses the command prompt until one or all of the Windows PowerShell background
jobs running in the session are complete.</td>
            </tr>
            <tr>
              <td>
Remove-Job</td>
              <td>
Deletes a Windows PowerShell background job.</td>
            </tr>
            <tr>
              <td>
Start-Job</td>
              <td>
Starts a Windows PowerShell background job.</td>
            </tr>
            <tr>
              <td>
Get-Job</td>
              <td>
Gets Windows PowerShell background jobs that are running in the current session.</td>
            </tr>
            <tr>
              <td>
Receive-Job</td>
              <td>
Gets the results of the Windows PowerShell background jobs in the current session.
You can use this cmdlet to retrieve the output and errors of background jobs.</td>
            </tr>
            <tr>
              <td>
Update-List</td>
              <td>
Adds and removes items from a property value that contains a collection of objects.</td>
            </tr>
            <tr>
              <td>
Import-LocalizedData</td>
              <td>
Imports language-specific data into scripts and functions based on the UI culture
that is selected for the operating system.</td>
            </tr>
            <tr>
              <td>
Send-MailMessage</td>
              <td>
Sends an e-mail message.</td>
            </tr>
            <tr>
              <td>
Get-Module</td>
              <td>
Get-Module [[-Name] &lt;String[]&gt;] [-All] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] Get-Module
[[-Name] &lt;String[]&gt;] [-ListAvailable] [-Recurse] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Remove-Module</td>
              <td>
Remove-Module [-Name] &lt;String[]&gt; [-Force] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] [-WhatIf] [-Confirm] Remove-Module [-ModuleInfo] &lt;PSModuleInfo[]&gt;
[-Force] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] [-WhatIf] [-Confirm] 
</td>
            </tr>
            <tr>
              <td>
New-Module</td>
              <td>
New-Module [-ScriptBlock] &lt;ScriptBlock&gt; [-Function &lt;String[]&gt;] [-Cmdlet
&lt;String[]&gt;] [-ReturnResult] [-AsCustomObject] [-ArgumentList &lt;Object[]&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] New-Module [-Name] &lt;String&gt; [-ScriptBlock] &lt;ScriptBlock&gt;
[-Function &lt;String[]&gt;] [-Cmdlet &lt;String[]&gt;] [-ReturnResult] [-AsCustomObject]
[-ArgumentList &lt;Object[]&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Import-Module</td>
              <td>
Import-Module [-Name] &lt;String[]&gt; [-Prefix &lt;String&gt;] [-Function &lt;String[]&gt;]
[-Cmdlet &lt;String[]&gt;] [-Variable &lt;String[]&gt;] [-Alias &lt;String[]&gt;]
[-Force] [-PassThru] [-AsCustomObject] [-Version &lt;Version&gt;] [-ArgumentList &lt;Object[]&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] Import-Module [-Assembly] &lt;Assembly[]&gt; [-Prefix &lt;String&gt;]
[-Function &lt;String[]&gt;] [-Cmdlet &lt;String[]&gt;] [-Variable &lt;String[]&gt;]
[-Alias &lt;String[]&gt;] [-Force] [-PassThru] [-AsCustomObject] [-Version &lt;Version&gt;]
[-ArgumentList &lt;Object[]&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] Import-Module
[-ModuleInfo] &lt;PSModuleInfo[]&gt; [-Prefix &lt;String&gt;] [-Function &lt;String[]&gt;]
[-Cmdlet &lt;String[]&gt;] [-Variable &lt;String[]&gt;] [-Alias &lt;String[]&gt;]
[-Force] [-PassThru] [-AsCustomObject] [-Version &lt;Version&gt;] [-ArgumentList &lt;Object[]&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Test-ModuleManifest</td>
              <td>
Test-ModuleManifest [-Path] &lt;String&gt; [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
New-ModuleManifest</td>
              <td>
New-ModuleManifest [-Path] &lt;String&gt; -NestedModules &lt;String[]&gt; [-Guid &lt;Guid&gt;]
-Author &lt;String&gt; -CompanyName &lt;String&gt; -Copyright &lt;String&gt; [-ModuleToProcess
&lt;String&gt;] [-ModuleVersion &lt;Version&gt;] -Description &lt;String&gt; [-PowerShellVersion
&lt;Version&gt;] [-ClrVersion &lt;Version&gt;] [-RequiredModules &lt;IDictionary[]&gt;]
-TypesToProcess &lt;String[]&gt; -FormatsToProcess &lt;String[]&gt; [-ScriptsToProcess
&lt;String[]&gt;] -RequiredAssemblies &lt;String[]&gt; -OtherFiles &lt;String[]&gt;
[-ExportedFunctions &lt;String[]&gt;] [-ExportedAliases &lt;String[]&gt;] [-ExportedVariables
&lt;String[]&gt;] [-ExportedCmdlets &lt;String[]&gt;] [-PrivateData &lt;Object&gt;]
[-PassThru] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] [-WhatIf] [-Confirm] 
</td>
            </tr>
            <tr>
              <td>
Export-ModuleMember</td>
              <td>
Export-ModuleMember [[-Function] &lt;String[]&gt;] [-Cmdlet &lt;String[]&gt;] [-Variable
&lt;String[]&gt;] [-Alias &lt;String[]&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Register-ObjectEvent</td>
              <td>
Register-ObjectEvent [-InputObject] &lt;PSObject&gt; [-EventName] &lt;String&gt; [[-SourceIdentifier]
&lt;String&gt;] [[-Action] &lt;ScriptBlock&gt;] [-MessageData &lt;PSObject&gt;] [-SupportEvent]
[-Forward] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Start-Process</td>
              <td>
Starts one or more processes on the local computer.</td>
            </tr>
            <tr>
              <td>
Debug-Process</td>
              <td>
Debugs one or more processes running on the local computer.</td>
            </tr>
            <tr>
              <td>
Wait-Process</td>
              <td>
Waits for the processes to be stopped before accepting more input.</td>
            </tr>
            <tr>
              <td>
Enable-PSBreakpoint</td>
              <td>
Enables the breakpoints in the current console.</td>
            </tr>
            <tr>
              <td>
Disable-PSBreakpoint</td>
              <td>
Disables the breakpoints in the current console.</td>
            </tr>
            <tr>
              <td>
Remove-PSBreakpoint</td>
              <td>
Deletes breakpoints from the current console.</td>
            </tr>
            <tr>
              <td>
Set-PSBreakpoint</td>
              <td>
Sets a breakpoint on a line, command, or variable.</td>
            </tr>
            <tr>
              <td>
Get-PSBreakpoint</td>
              <td>
Gets the breakpoints that are set in the current console.</td>
            </tr>
            <tr>
              <td>
Get-PSCallStack</td>
              <td>
Displays the current call stack.</td>
            </tr>
            <tr>
              <td>
Remove-PSSession</td>
              <td>
Closes one or more Windows PowerShell sessions (PSSessions).</td>
            </tr>
            <tr>
              <td>
Enter-PSSession</td>
              <td>
Starts an interactive session with a remote computer.</td>
            </tr>
            <tr>
              <td>
Exit-PSSession</td>
              <td>
Ends an interactive session with a remote computer.</td>
            </tr>
            <tr>
              <td>
Get-PSSession</td>
              <td>
Gets the Windows PowerShell sessions (PSSessions) in the current session.</td>
            </tr>
            <tr>
              <td>
Export-PSSession</td>
              <td>
Saves commands from another session in a script module file.</td>
            </tr>
            <tr>
              <td>
Import-PSSession</td>
              <td>
Imports cmdlets, aliases, functions, and other command types from another session
on a local or remote computer into the current session.</td>
            </tr>
            <tr>
              <td>
New-PSSession</td>
              <td>
Creates a persistent connection to a local or remote computer.</td>
            </tr>
            <tr>
              <td>
Set-PSSessionConfiguration</td>
              <td>
Set-PSSessionConfiguration [-Name] &lt;String&gt; [-ApplicationBase &lt;String&gt;]
[-ThreadApartmentState &lt;ApartmentState&gt;] [-ThreadOptions &lt;PSThreadOptions&gt;]
[-StartupScript &lt;String&gt;] [-MaximumReceivedDataSizePerCommandMB &lt;Nullable`1&gt;]
[-MaximumReceivedObjectSizeMB &lt;Nullable`1&gt;] [-SecurityDescriptorSddl &lt;String&gt;]
[-Force] [-NoServiceRestart] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] Set-PSSessionConfiguration
[-Name] &lt;String&gt; [-AssemblyName] &lt;String&gt; [-ConfigurationTypeName] &lt;String&gt;
[-ApplicationBase &lt;String&gt;] [-ThreadApartmentState &lt;ApartmentState&gt;] [-ThreadOptions
&lt;PSThreadOptions&gt;] [-StartupScript &lt;String&gt;] [-MaximumReceivedDataSizePerCommandMB
&lt;Nullable`1&gt;] [-MaximumReceivedObjectSizeMB &lt;Nullable`1&gt;] [-SecurityDescriptorSddl
&lt;String&gt;] [-Force] [-NoServiceRestart] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Enable-PSSessionConfiguration</td>
              <td>
Enable-PSSessionConfiguration [[-Name] &lt;String[]&gt;] [-Force] [-SecurityDescriptorSddl
&lt;String&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Disable-PSSessionConfiguration</td>
              <td>
Disable-PSSessionConfiguration [[-Name] &lt;String[]&gt;] [-Force] [-Verbose] [-Debug]
[-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Register-PSSessionConfiguration</td>
              <td>
Register-PSSessionConfiguration [-Name] &lt;String&gt; [-ProcessorArchitecture &lt;String&gt;]
[-ApplicationBase &lt;String&gt;] [-ThreadApartmentState &lt;ApartmentState&gt;] [-ThreadOptions
&lt;PSThreadOptions&gt;] [-StartupScript &lt;String&gt;] [-MaximumReceivedDataSizePerCommandMB
&lt;Nullable`1&gt;] [-MaximumReceivedObjectSizeMB &lt;Nullable`1&gt;] [-SecurityDescriptorSddl
&lt;String&gt;] [-Force] [-NoServiceRestart] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] Register-PSSessionConfiguration
[-Name] &lt;String&gt; [-AssemblyName] &lt;String&gt; [-ConfigurationTypeName] &lt;String&gt;
[-ProcessorArchitecture &lt;String&gt;] [-ApplicationBase &lt;String&gt;] [-ThreadApartmentState
&lt;ApartmentState&gt;] [-ThreadOptions &lt;PSThreadOptions&gt;] [-StartupScript &lt;String&gt;]
[-MaximumReceivedDataSizePerCommandMB &lt;Nullable`1&gt;] [-MaximumReceivedObjectSizeMB
&lt;Nullable`1&gt;] [-SecurityDescriptorSddl &lt;String&gt;] [-Force] [-NoServiceRestart]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Unregister-PSSessionConfiguration</td>
              <td>
Unregister-PSSessionConfiguration [-Name] &lt;String&gt; [-Force] [-NoServiceRestart]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Get-PSSessionConfiguration</td>
              <td>
Get-PSSessionConfiguration [[-Name] &lt;String[]&gt;] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Get-Random</td>
              <td>
Gets a random number or selects objects randomly from a collection.</td>
            </tr>
            <tr>
              <td>
Set-StrictMode</td>
              <td>
Establishes and enforces coding rules in expressions, scripts, and script blocks.</td>
            </tr>
            <tr>
              <td>
ConvertFrom-StringData</td>
              <td>
Converts a string containing one or more "name=value" pairs to a hash table.</td>
            </tr>
            <tr>
              <td>
Undo-Transaction</td>
              <td>
Rolls back the active transaction.</td>
            </tr>
            <tr>
              <td>
Use-Transaction</td>
              <td>
Adds the script block to the active transaction.</td>
            </tr>
            <tr>
              <td>
Complete-Transaction</td>
              <td>
Commits the active transaction.</td>
            </tr>
            <tr>
              <td>
Get-Transaction</td>
              <td>
Gets the current (active) transaction.</td>
            </tr>
            <tr>
              <td>
Start-Transaction</td>
              <td>
Starts a transaction.</td>
            </tr>
            <tr>
              <td>
Add-Type</td>
              <td>
Adds a .NET type (a class) to a Windows PowerShell session.</td>
            </tr>
            <tr>
              <td>
New-WebServiceProxy</td>
              <td>
Creates a Web service proxy object that lets you use and manage the Web service in
Windows PowerShell.</td>
            </tr>
            <tr>
              <td>
Get-WinEvent</td>
              <td>
Gets events from event logs and event tracing log files on local and remote computers.
This cmdlet runs only on Windows Vista and later versions of Windows.</td>
            </tr>
            <tr>
              <td>
Register-WmiEvent</td>
              <td>
Register-WmiEvent [-Class] &lt;String&gt; [[-SourceIdentifier] &lt;String&gt;] [[-Action]
&lt;ScriptBlock&gt;] [-Namespace &lt;String&gt;] [-Credential &lt;PSCredential&gt;]
[-ComputerName &lt;String&gt;] [-Timeout &lt;Int64&gt;] [-MessageData &lt;PSObject&gt;]
[-SupportEvent] [-Forward] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] Register-WmiEvent
[-Query] &lt;String&gt; [[-SourceIdentifier] &lt;String&gt;] [[-Action] &lt;ScriptBlock&gt;]
[-Namespace &lt;String&gt;] [-Credential &lt;PSCredential&gt;] [-ComputerName &lt;String&gt;]
[-Timeout &lt;Int64&gt;] [-MessageData &lt;PSObject&gt;] [-SupportEvent] [-Forward]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Set-WmiInstance</td>
              <td>
Creates or modifies instances of WMI classes.</td>
            </tr>
            <tr>
              <td>
Invoke-WmiMethod</td>
              <td>
Calls WMI methods.</td>
            </tr>
            <tr>
              <td>
Remove-WmiObject</td>
              <td>
Deletes WMI classes and instances.</td>
            </tr>
            <tr>
              <td>
Disconnect-WSMan</td>
              <td>
Disconnect-WSMan [[-ComputerName] &lt;String&gt;] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Connect-WSMan</td>
              <td>
Connect-WSMan [[-ComputerName] &lt;String&gt;] [-ApplicationName &lt;String&gt;] [-Authentication
&lt;AuthenticationMechanism&gt;] [-Credential &lt;PSCredential&gt;] [-OptionSet &lt;Hashtable&gt;]
[-Port &lt;Int32&gt;] [-SessionOption &lt;SessionOption&gt;] [-UseSSL] [-Verbose]
[-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] Connect-WSMan [-Authentication &lt;AuthenticationMechanism&gt;]
[-ConnectionURI &lt;Uri&gt;] [-Credential &lt;PSCredential&gt;] [-OptionSet &lt;Hashtable&gt;]
[-Port &lt;Int32&gt;] [-SessionOption &lt;SessionOption&gt;] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Test-WSMan</td>
              <td>
Test-WSMan [[-ComputerName] &lt;String&gt;] [-Authentication &lt;AuthenticationMechanism&gt;]
[-Credential &lt;PSCredential&gt;] [-Port &lt;Int32&gt;] [-UseSSL] [-ApplicationName
&lt;String&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Invoke-WSManAction</td>
              <td>
Invoke-WSManAction [-ResourceURI] &lt;Uri&gt; [-Action] &lt;String&gt; [[-SelectorSet]
&lt;Hashtable&gt;] [-Authentication &lt;AuthenticationMechanism&gt;] [-ConnectionURI
&lt;Uri&gt;] [-Credential &lt;PSCredential&gt;] [-FilePath &lt;String&gt;] [-OptionSet
&lt;Hashtable&gt;] [-SessionOption &lt;SessionOption&gt;] [-ValueSet &lt;Hashtable&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] Invoke-WSManAction [-ResourceURI] &lt;Uri&gt; [-Action]
&lt;String&gt; [[-SelectorSet] &lt;Hashtable&gt;] [-ApplicationName &lt;String&gt;]
[-Authentication &lt;AuthenticationMechanism&gt;] [-ComputerName &lt;String&gt;] [-Credential
&lt;PSCredential&gt;] [-FilePath &lt;String&gt;] [-OptionSet &lt;Hashtable&gt;] [-Port
&lt;Int32&gt;] [-SessionOption &lt;SessionOption&gt;] [-UseSSL] [-ValueSet &lt;Hashtable&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Get-WSManCredSSP</td>
              <td>
Get-WSManCredSSP [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Enable-WSManCredSSP</td>
              <td>
Enable-WSManCredSSP [-DelegateComputer] &lt;String[]&gt; [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Disable-WSManCredSSP</td>
              <td>
Disable-WSManCredSSP [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Remove-WSManInstance</td>
              <td>
Remove-WSManInstance [-ResourceURI] &lt;Uri&gt; [-SelectorSet] &lt;Hashtable&gt; [-ApplicationName
&lt;String&gt;] [-Authentication &lt;AuthenticationMechanism&gt;] [-ComputerName &lt;String&gt;]
[-Credential &lt;PSCredential&gt;] [-OptionSet &lt;Hashtable&gt;] [-Port &lt;Int32&gt;]
[-SessionOption &lt;SessionOption&gt;] [-UseSSL] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] Remove-WSManInstance [-ResourceURI] &lt;Uri&gt; [-SelectorSet] &lt;Hashtable&gt;
[-Authentication &lt;AuthenticationMechanism&gt;] [-ConnectionURI &lt;Uri&gt;] [-Credential
&lt;PSCredential&gt;] [-OptionSet &lt;Hashtable&gt;] [-SessionOption &lt;SessionOption&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
New-WSManInstance</td>
              <td>
New-WSManInstance [-ResourceURI] &lt;Uri&gt; [-SelectorSet] &lt;Hashtable&gt; [-ApplicationName
&lt;String&gt;] [-Authentication &lt;AuthenticationMechanism&gt;] [-ComputerName &lt;String&gt;]
[-Credential &lt;PSCredential&gt;] [-FilePath &lt;String&gt;] [-OptionSet &lt;Hashtable&gt;]
[-Port &lt;Int32&gt;] [-SessionOption &lt;SessionOption&gt;] [-UseSSL] [-ValueSet
&lt;Hashtable&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] New-WSManInstance [-ResourceURI]
&lt;Uri&gt; [-SelectorSet] &lt;Hashtable&gt; [-Authentication &lt;AuthenticationMechanism&gt;]
[-ConnectionURI &lt;Uri&gt;] [-Credential &lt;PSCredential&gt;] [-FilePath &lt;String&gt;]
[-OptionSet &lt;Hashtable&gt;] [-SessionOption &lt;SessionOption&gt;] [-ValueSet &lt;Hashtable&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Get-WSManInstance</td>
              <td>
Get-WSManInstance [-ResourceURI] &lt;Uri&gt; [-ApplicationName &lt;String&gt;] [-Authentication
&lt;AuthenticationMechanism&gt;] [-ComputerName &lt;String&gt;] [-ConnectionURI &lt;Uri&gt;]
[-Credential &lt;PSCredential&gt;] [-Dialect &lt;Uri&gt;] [-Fragment &lt;String&gt;]
[-OptionSet &lt;Hashtable&gt;] [-Port &lt;Int32&gt;] [-SelectorSet &lt;Hashtable&gt;]
[-SessionOption &lt;SessionOption&gt;] [-UseSSL] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] Get-WSManInstance [-ResourceURI] &lt;Uri&gt; [-ApplicationName &lt;String&gt;]
[-Authentication &lt;AuthenticationMechanism&gt;] [-BasePropertiesOnly] [-ComputerName
&lt;String&gt;] [-ConnectionURI &lt;Uri&gt;] [-Credential &lt;PSCredential&gt;] [-Dialect
&lt;Uri&gt;] -Enumerate [-Filter &lt;String&gt;] [-OptionSet &lt;Hashtable&gt;] [-Port
&lt;Int32&gt;] [-References] [-ReturnType &lt;String&gt;] [-SessionOption &lt;SessionOption&gt;]
[-Shallow] [-UseSSL] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction
&lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;]
[-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Set-WSManInstance</td>
              <td>
Set-WSManInstance [-ResourceURI] &lt;Uri&gt; [[-SelectorSet] &lt;Hashtable&gt;] [-ApplicationName
&lt;String&gt;] [-Authentication &lt;AuthenticationMechanism&gt;] [-ComputerName &lt;String&gt;]
[-Credential &lt;PSCredential&gt;] [-Dialect &lt;Uri&gt;] [-FilePath &lt;String&gt;]
[-Fragment &lt;String&gt;] [-OptionSet &lt;Hashtable&gt;] [-Port &lt;Int32&gt;] [-SessionOption
&lt;SessionOption&gt;] [-UseSSL] [-ValueSet &lt;Hashtable&gt;] [-Verbose] [-Debug]
[-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] Set-WSManInstance [-ResourceURI] &lt;Uri&gt; [[-SelectorSet]
&lt;Hashtable&gt;] [-Authentication &lt;AuthenticationMechanism&gt;] [-ConnectionURI
&lt;Uri&gt;] [-Credential &lt;PSCredential&gt;] [-Dialect &lt;Uri&gt;] [-FilePath
&lt;String&gt;] [-Fragment &lt;String&gt;] [-OptionSet &lt;Hashtable&gt;] [-SessionOption
&lt;SessionOption&gt;] [-ValueSet &lt;Hashtable&gt;] [-Verbose] [-Debug] [-ErrorAction
&lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable
&lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer
&lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Set-WSManQuickConfig</td>
              <td>
Set-WSManQuickConfig [-UseSSL] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
New-WSManSessionOption</td>
              <td>
New-WSManSessionOption [-ProxyAccessType &lt;ProxyAccessType&gt;] [-ProxyAuthentication
&lt;ProxyAuthentication&gt;] [-ProxyCredential &lt;PSCredential&gt;] [-SkipCACheck]
[-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort &lt;Int32&gt;] [-OperationTimeout
&lt;Int32&gt;] [-NoEncryption] [-UseUTF16] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
Select-Xml</td>
              <td>
Select-Xml [-XPath] &lt;String&gt; [-Path] &lt;String[]&gt; [-Namespace &lt;Hashtable&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] Select-Xml [-XPath] &lt;String&gt; [-Xml] &lt;XmlNode[]&gt;
[-Namespace &lt;Hashtable&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;]
[-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable
&lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;] Select-Xml
[-XPath] &lt;String&gt; [-Content] &lt;String[]&gt; [-Namespace &lt;Hashtable&gt;]
[-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;]
[-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;]
[-OutBuffer &lt;Int32&gt;] 
</td>
            </tr>
            <tr>
              <td>
ConvertTo-Xml</td>
              <td>
Creates an XML-based representation of an object.</td>
            </tr>
          </tbody>
        </table>
        <p>
Whew, that’s quite a few. Now, onto the API.
</p>
        <h4>.NET API Differences
</h4>
        <p>
This time, I’m just dumping out the namespaces and Types per namespace. It would be
a bit much to dump out all the Types themselves. The one-liner:
</p>
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span class="variable">$v1</span>
                <span>.api | group namespace | select name,
count | convertto-html -fragment &gt; .\v1-types.htm  </span>
              </span>
            </li>
          </ol>
        </div>
        <strong>v1.0 RTM API </strong>
        <p>
Here are the namspaces and respective public Type count for v1.0:
</p>
        <table>
          <colgroup>
            <col />
            <col />
          </colgroup>
          <tbody>
            <tr>
              <th>
Name</th>
              <th>
Count</th>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands</td>
              <td>
196</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell</td>
              <td>
11</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands.Internal.Format</td>
              <td>
4</td>
            </tr>
            <tr>
              <td>
System.Management.Automation</td>
              <td>
169</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Internal</td>
              <td>
6</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Host</td>
              <td>
15</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Runspaces</td>
              <td>
33</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Provider</td>
              <td>
13</td>
            </tr>
          </tbody>
        </table>
        <p>
          <strong>v2.0 CTP3 API </strong>
        </p>
        <p>
Here are the namspaces and respective public Type count for v2.0 CTP3:
</p>
        <table>
          <colgroup>
            <col />
            <col />
          </colgroup>
          <tbody>
            <tr>
              <th>
Name</th>
              <th>
Count</th>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands</td>
              <td>
311</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands.GetCounter</td>
              <td>
4</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell</td>
              <td>
14</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands.Internal.Format</td>
              <td>
4</td>
            </tr>
            <tr>
              <td>
Microsoft.WSMan.Management</td>
              <td>
40</td>
            </tr>
            <tr>
              <td>
System.Management.Automation</td>
              <td>
262</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Internal</td>
              <td>
7</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Runspaces</td>
              <td>
61</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Host</td>
              <td>
17</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Remoting</td>
              <td>
10</td>
            </tr>
            <tr>
              <td>
System.Management.Automation.Provider</td>
              <td>
14</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands.Internal</td>
              <td>
4</td>
            </tr>
            <tr>
              <td>
Microsoft.PowerShell.Commands.Management</td>
              <td>
1</td>
            </tr>
          </tbody>
        </table>
        <p>
As you can see, there has been a nice expansion of namespaces and Types to work with,
mostly coming from the sterling work being done to generalize the “Jobs” infrastructure.
Also, a fair chunk is tied up with the refactoring and reorganizing of Runspaces to
allow for jobs (which also covers eventing), remoting and background pipelines. This
is something I will cover in more detail in a future post.
</p>
        <p>
Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=f33b33fb-273a-4c45-9695-cdcc0c768aaf" />
      </body>
      <title>Differences between PowerShell 1.0 RTM and Powershell 2.0 CTP3/Win7 Beta</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,f33b33fb-273a-4c45-9695-cdcc0c768aaf.aspx</guid>
      <link>http://www.nivot.org/2009/02/04/DifferencesBetweenPowerShell10RTMAndPowershell20CTP3Win7Beta.aspx</link>
      <pubDate>Wed, 04 Feb 2009 00:18:14 GMT</pubDate>
      <description>&lt;p&gt;
It’s been quite a few years -- November 14, 2006 to be exact -- since the final release
of &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; 1.0.
Let’s see what the &lt;a href="http://blogs.msdn.com/powershell" target="_blank"&gt;lazy
buggers&lt;/a&gt; have been up to since then. Only kidding, they’re far from lazy; we’ve
gained an extra one hundred and six new cmdlets, moving from 131 to 237. We’ve also
gained another provider, WSManProvider which lets you explore and manipulate the WS-Man
configuration. Finally, the number of public Types (.NET classes usable by 3rd parties
to extend PowerShell) has increased from 447 to 749. So how do I know all this? Well,
some months ago I wrote a suite of build analysis Cmdlets for examining the assemblies
that comprise PowerShell. In its current form it’s of very little use to 3rd parties,
but I’ve had some requests to open it up and allow it to analyze any binary modules
and snap-ins, which is a good idea I think. Watch this space. Anyway, I’m going to
dump out some interest information on the differences between v1.0 and v2.0 CTP3,
along with the one-liners I’m using to generate the information. 
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;strong&gt;update feb 5&lt;/strong&gt;: added breaking changes&lt;/em&gt;
&lt;/p&gt;
&lt;h4&gt;&lt;b&gt;Breaking Changes to Windows PowerShell 1.0&lt;/b&gt;&lt;u&gt;&lt;/u&gt;
&lt;/h4&gt;
&lt;p&gt;
&lt;u&gt;&lt;/u&gt; 
&lt;p&gt;
The following changes in Windows PowerShell V2.0 CTP3 might prevent features designed
for Windows PowerShell 1.0 from working correctly.&lt;u&gt;&lt;/u&gt; 
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;The value of the &lt;b&gt;PowerShellVersion&lt;/b&gt; registry entry in HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine
has been changed to &lt;b&gt;2.0&lt;/b&gt;.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;New cmdlets and variables have been added. These are listed below.
These new elements might conflict with variables and functions in profiles and scripts.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;b&gt;-&lt;/b&gt;IEQ operator does a case insensitive comparison on characters.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Get-Command gets functions along with cmdlets by default. 
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Any native command that generates a user interface blocks if it
is pipelined to the Out-Host cmdlet.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Added new language keywords: &lt;b&gt;Begin&lt;/b&gt;, &lt;strong&gt;Process, &lt;/strong&gt;and&lt;strong&gt; End&lt;/strong&gt;.
Any commands called &lt;b&gt;begin&lt;/b&gt;, &lt;b&gt;process&lt;/b&gt; or &lt;b&gt;end&lt;/b&gt; are interpreted as
language keywords and might result in parsing errors. 
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Cmdlet name resolution has changed. In Windows PowerShell 1.0, a
runtime error was generated when two Windows PowerShell snap-ins exported cmdlets
with the same name. In Windows PowerShell V2, the last cmdlet loaded is the one that
is executed if the cmdlet name is not qualified by a snap-in name.
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Terminating errors that are thrown in a pipeline do not terminate
the pipeline. Instead, they are written to the host. 
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;A function called with '-?' parameter gets the help topic for the
function, if one is included in the function. 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;
There are no changes to Cmdlets other than Get-Command’s –PSSnapin parameter is now
an alias to a –Module parameter. This reflects the move away from administrator-installed
snap-ins, and towards the friendlier Module system. For all intents and purposes,
you can treat v1 snapins as modules as load them as such with the Import-Module Cmdlet.
&lt;/p&gt;
&lt;h4&gt;New Cmdlets
&lt;/h4&gt;
&lt;p&gt;
Here are the new Cmdlets, sorted by noun and alongside the textual synopsis is one
is present in the CTP3 help, or the syntax if there is no help. The command I ran
to generate this was:
&lt;/p&gt;
&lt;p&gt;
&lt;!-- Stylesheet link --&gt;
&lt;link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css"&gt;
&lt;!-- Code --&gt;&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span&gt;compare-psbuildinfo (import-psbuildinfo .\rtm-6-0-6000-16386.psbuild)
(import-psbuildinfo .\win7beta1-6-1-7000-0.psbuild) | ? {&lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.diff
-eq &lt;/span&gt;&lt;span class="string"&gt;"Added"&lt;/span&gt;&lt;span&gt;} | sort noun | % { &lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt; |
add-member -name Synopsis -member noteproperty -value (&amp;amp; &lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.name
-?&lt;/span&gt;&lt;span class="variable"&gt;|select&lt;/span&gt;&lt;span&gt; -expand synopsis) -passthru }
| select name,synopsis | convertto-html -fragment &amp;gt; new-cmdlets.htm&amp;nbsp; &lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;style type="text/css"&gt;&lt;!--
#cmdlets tr td { vertical-align: top; border-top: 1px solid gray; text-align: left; }
--&gt;&lt;/style&gt;
&lt;table id="cmdlets"&gt;
&lt;colgroup&gt;
&lt;col&gt;
&lt;col&gt;
&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;
Name&lt;/th&gt;
&lt;th&gt;
Synopsis&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Invoke-Command&lt;/td&gt;
&lt;td&gt;
Runs commands on local and remote computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Add-Computer&lt;/td&gt;
&lt;td&gt;
Adds computers to a domain or workgroup.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-Computer&lt;/td&gt;
&lt;td&gt;
Removes computers from workgroups or domains.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Rename-Computer&lt;/td&gt;
&lt;td&gt;
Renames a computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Restore-Computer&lt;/td&gt;
&lt;td&gt;
Starts a system restore on the local computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Checkpoint-Computer&lt;/td&gt;
&lt;td&gt;
Creates a system restore point on the local computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Restart-Computer&lt;/td&gt;
&lt;td&gt;
Restarts ("reboots") the operating system on local and remote computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Stop-Computer&lt;/td&gt;
&lt;td&gt;
Stops (shuts down) local and remote computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Reset-ComputerMachinePassword&lt;/td&gt;
&lt;td&gt;
Resets the machine account password for the computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Disable-ComputerRestore&lt;/td&gt;
&lt;td&gt;
Disables the System Restore feature on the specified file system drive.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Enable-ComputerRestore&lt;/td&gt;
&lt;td&gt;
Enables the System Restore feature on the specified file system drive.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-ComputerRestorePoint&lt;/td&gt;
&lt;td&gt;
Gets the restore points on the local computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Test-ComputerSecureChannel&lt;/td&gt;
&lt;td&gt;
Test-ComputerSecureChannel [-Repair] [-Server &amp;lt;String&amp;gt;] [-Verbose] [-Debug]
[-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Test-Connection&lt;/td&gt;
&lt;td&gt;
Sends ICMP echo request packets ("pings") to one or more computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Export-Counter&lt;/td&gt;
&lt;td&gt;
The Export-Counter cmdlet takes PerformanceCounterSampleSet objects and exports them
as counter log files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Import-Counter&lt;/td&gt;
&lt;td&gt;
Imports performance counter log files (.blg, .csv, .tsv) and creates the objects that
represent each counter sample in the log.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-Counter&lt;/td&gt;
&lt;td&gt;
Gets performance counter data from local and remote computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
ConvertFrom-Csv&lt;/td&gt;
&lt;td&gt;
Converts object properties in CSV format into CSV versions of the original objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
ConvertTo-Csv&lt;/td&gt;
&lt;td&gt;
Converts .NET objects into a series of comma-separated, variable-length (CSV) strings.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Register-EngineEvent&lt;/td&gt;
&lt;td&gt;
Register-EngineEvent [-SourceIdentifier] &amp;lt;String&amp;gt; [[-Action] &amp;lt;ScriptBlock&amp;gt;]
[-MessageData &amp;lt;PSObject&amp;gt;] [-SupportEvent] [-Forward] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Unregister-Event&lt;/td&gt;
&lt;td&gt;
Unregister-Event [-SourceIdentifier] &amp;lt;String&amp;gt; [-Force] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] Unregister-Event [-SubscriptionId] &amp;lt;Int32&amp;gt;
[-Force] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-Event&lt;/td&gt;
&lt;td&gt;
New-Event [-SourceIdentifier] &amp;lt;String&amp;gt; [[-Sender] &amp;lt;PSObject&amp;gt;] [[-EventArguments]
&amp;lt;PSObject[]&amp;gt;] [[-MessageData] &amp;lt;PSObject&amp;gt;] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-Event&lt;/td&gt;
&lt;td&gt;
Remove-Event [-SourceIdentifier] &amp;lt;String&amp;gt; [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] Remove-Event [-EventIdentifier] &amp;lt;Int32&amp;gt;
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Wait-Event&lt;/td&gt;
&lt;td&gt;
Wait-Event [[-SourceIdentifier] &amp;lt;String&amp;gt;] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-Event&lt;/td&gt;
&lt;td&gt;
Get-Event [[-SourceIdentifier] &amp;lt;String&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Show-EventLog&lt;/td&gt;
&lt;td&gt;
Displays the event logs of the local or a remote computer in Event Viewer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-EventLog&lt;/td&gt;
&lt;td&gt;
Creates a new event log and a new event source on a local or remote computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-EventLog&lt;/td&gt;
&lt;td&gt;
Deletes an event log or unregisters an event source.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Clear-EventLog&lt;/td&gt;
&lt;td&gt;
Deletes all entries from specified event logs on the local or remote computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Write-EventLog&lt;/td&gt;
&lt;td&gt;
Writes an event to an event log.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Limit-EventLog&lt;/td&gt;
&lt;td&gt;
Sets the event log properties that limit the size of the event log and the age of
its entries.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-EventSubscriber&lt;/td&gt;
&lt;td&gt;
Get-EventSubscriber [[-SourceIdentifier] &amp;lt;String&amp;gt;] [-Force] [-Verbose] [-Debug]
[-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Export-FormatData&lt;/td&gt;
&lt;td&gt;
Export-FormatData [-InputObject &amp;lt;ExtendedTypeDefinition[]&amp;gt;] [-FilePath &amp;lt;String&amp;gt;]
[-Force] [-NoClobber] [-IncludeScriptBlock] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-FormatData&lt;/td&gt;
&lt;td&gt;
Get-FormatData [[-TypeName] &amp;lt;String[]&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Out-GridView&lt;/td&gt;
&lt;td&gt;
Sends output to an interactive table in a separate window.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Clear-History&lt;/td&gt;
&lt;td&gt;
Deletes entries from the command history.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-HotFix&lt;/td&gt;
&lt;td&gt;
Gets the QFE updates that have been applied to the local and remote computers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Stop-Job&lt;/td&gt;
&lt;td&gt;
Stops a Windows PowerShell background job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Wait-Job&lt;/td&gt;
&lt;td&gt;
Suppresses the command prompt until one or all of the Windows PowerShell background
jobs running in the session are complete.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-Job&lt;/td&gt;
&lt;td&gt;
Deletes a Windows PowerShell background job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Start-Job&lt;/td&gt;
&lt;td&gt;
Starts a Windows PowerShell background job.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-Job&lt;/td&gt;
&lt;td&gt;
Gets Windows PowerShell background jobs that are running in the current session.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Receive-Job&lt;/td&gt;
&lt;td&gt;
Gets the results of the Windows PowerShell background jobs in the current session.
You can use this cmdlet to retrieve the output and errors of background jobs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Update-List&lt;/td&gt;
&lt;td&gt;
Adds and removes items from a property value that contains a collection of objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Import-LocalizedData&lt;/td&gt;
&lt;td&gt;
Imports language-specific data into scripts and functions based on the UI culture
that is selected for the operating system.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Send-MailMessage&lt;/td&gt;
&lt;td&gt;
Sends an e-mail message.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-Module&lt;/td&gt;
&lt;td&gt;
Get-Module [[-Name] &amp;lt;String[]&amp;gt;] [-All] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] Get-Module
[[-Name] &amp;lt;String[]&amp;gt;] [-ListAvailable] [-Recurse] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-Module&lt;/td&gt;
&lt;td&gt;
Remove-Module [-Name] &amp;lt;String[]&amp;gt; [-Force] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] Remove-Module [-ModuleInfo] &amp;lt;PSModuleInfo[]&amp;gt;
[-Force] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-Module&lt;/td&gt;
&lt;td&gt;
New-Module [-ScriptBlock] &amp;lt;ScriptBlock&amp;gt; [-Function &amp;lt;String[]&amp;gt;] [-Cmdlet
&amp;lt;String[]&amp;gt;] [-ReturnResult] [-AsCustomObject] [-ArgumentList &amp;lt;Object[]&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] New-Module [-Name] &amp;lt;String&amp;gt; [-ScriptBlock] &amp;lt;ScriptBlock&amp;gt;
[-Function &amp;lt;String[]&amp;gt;] [-Cmdlet &amp;lt;String[]&amp;gt;] [-ReturnResult] [-AsCustomObject]
[-ArgumentList &amp;lt;Object[]&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Import-Module&lt;/td&gt;
&lt;td&gt;
Import-Module [-Name] &amp;lt;String[]&amp;gt; [-Prefix &amp;lt;String&amp;gt;] [-Function &amp;lt;String[]&amp;gt;]
[-Cmdlet &amp;lt;String[]&amp;gt;] [-Variable &amp;lt;String[]&amp;gt;] [-Alias &amp;lt;String[]&amp;gt;]
[-Force] [-PassThru] [-AsCustomObject] [-Version &amp;lt;Version&amp;gt;] [-ArgumentList &amp;lt;Object[]&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] Import-Module [-Assembly] &amp;lt;Assembly[]&amp;gt; [-Prefix &amp;lt;String&amp;gt;]
[-Function &amp;lt;String[]&amp;gt;] [-Cmdlet &amp;lt;String[]&amp;gt;] [-Variable &amp;lt;String[]&amp;gt;]
[-Alias &amp;lt;String[]&amp;gt;] [-Force] [-PassThru] [-AsCustomObject] [-Version &amp;lt;Version&amp;gt;]
[-ArgumentList &amp;lt;Object[]&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] Import-Module
[-ModuleInfo] &amp;lt;PSModuleInfo[]&amp;gt; [-Prefix &amp;lt;String&amp;gt;] [-Function &amp;lt;String[]&amp;gt;]
[-Cmdlet &amp;lt;String[]&amp;gt;] [-Variable &amp;lt;String[]&amp;gt;] [-Alias &amp;lt;String[]&amp;gt;]
[-Force] [-PassThru] [-AsCustomObject] [-Version &amp;lt;Version&amp;gt;] [-ArgumentList &amp;lt;Object[]&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Test-ModuleManifest&lt;/td&gt;
&lt;td&gt;
Test-ModuleManifest [-Path] &amp;lt;String&amp;gt; [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-ModuleManifest&lt;/td&gt;
&lt;td&gt;
New-ModuleManifest [-Path] &amp;lt;String&amp;gt; -NestedModules &amp;lt;String[]&amp;gt; [-Guid &amp;lt;Guid&amp;gt;]
-Author &amp;lt;String&amp;gt; -CompanyName &amp;lt;String&amp;gt; -Copyright &amp;lt;String&amp;gt; [-ModuleToProcess
&amp;lt;String&amp;gt;] [-ModuleVersion &amp;lt;Version&amp;gt;] -Description &amp;lt;String&amp;gt; [-PowerShellVersion
&amp;lt;Version&amp;gt;] [-ClrVersion &amp;lt;Version&amp;gt;] [-RequiredModules &amp;lt;IDictionary[]&amp;gt;]
-TypesToProcess &amp;lt;String[]&amp;gt; -FormatsToProcess &amp;lt;String[]&amp;gt; [-ScriptsToProcess
&amp;lt;String[]&amp;gt;] -RequiredAssemblies &amp;lt;String[]&amp;gt; -OtherFiles &amp;lt;String[]&amp;gt;
[-ExportedFunctions &amp;lt;String[]&amp;gt;] [-ExportedAliases &amp;lt;String[]&amp;gt;] [-ExportedVariables
&amp;lt;String[]&amp;gt;] [-ExportedCmdlets &amp;lt;String[]&amp;gt;] [-PrivateData &amp;lt;Object&amp;gt;]
[-PassThru] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] [-WhatIf] [-Confirm] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Export-ModuleMember&lt;/td&gt;
&lt;td&gt;
Export-ModuleMember [[-Function] &amp;lt;String[]&amp;gt;] [-Cmdlet &amp;lt;String[]&amp;gt;] [-Variable
&amp;lt;String[]&amp;gt;] [-Alias &amp;lt;String[]&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Register-ObjectEvent&lt;/td&gt;
&lt;td&gt;
Register-ObjectEvent [-InputObject] &amp;lt;PSObject&amp;gt; [-EventName] &amp;lt;String&amp;gt; [[-SourceIdentifier]
&amp;lt;String&amp;gt;] [[-Action] &amp;lt;ScriptBlock&amp;gt;] [-MessageData &amp;lt;PSObject&amp;gt;] [-SupportEvent]
[-Forward] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Start-Process&lt;/td&gt;
&lt;td&gt;
Starts one or more processes on the local computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Debug-Process&lt;/td&gt;
&lt;td&gt;
Debugs one or more processes running on the local computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Wait-Process&lt;/td&gt;
&lt;td&gt;
Waits for the processes to be stopped before accepting more input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Enable-PSBreakpoint&lt;/td&gt;
&lt;td&gt;
Enables the breakpoints in the current console.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Disable-PSBreakpoint&lt;/td&gt;
&lt;td&gt;
Disables the breakpoints in the current console.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-PSBreakpoint&lt;/td&gt;
&lt;td&gt;
Deletes breakpoints from the current console.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-PSBreakpoint&lt;/td&gt;
&lt;td&gt;
Sets a breakpoint on a line, command, or variable.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-PSBreakpoint&lt;/td&gt;
&lt;td&gt;
Gets the breakpoints that are set in the current console.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-PSCallStack&lt;/td&gt;
&lt;td&gt;
Displays the current call stack.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-PSSession&lt;/td&gt;
&lt;td&gt;
Closes one or more Windows PowerShell sessions (PSSessions).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Enter-PSSession&lt;/td&gt;
&lt;td&gt;
Starts an interactive session with a remote computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Exit-PSSession&lt;/td&gt;
&lt;td&gt;
Ends an interactive session with a remote computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-PSSession&lt;/td&gt;
&lt;td&gt;
Gets the Windows PowerShell sessions (PSSessions) in the current session.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Export-PSSession&lt;/td&gt;
&lt;td&gt;
Saves commands from another session in a script module file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Import-PSSession&lt;/td&gt;
&lt;td&gt;
Imports cmdlets, aliases, functions, and other command types from another session
on a local or remote computer into the current session.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-PSSession&lt;/td&gt;
&lt;td&gt;
Creates a persistent connection to a local or remote computer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-PSSessionConfiguration&lt;/td&gt;
&lt;td&gt;
Set-PSSessionConfiguration [-Name] &amp;lt;String&amp;gt; [-ApplicationBase &amp;lt;String&amp;gt;]
[-ThreadApartmentState &amp;lt;ApartmentState&amp;gt;] [-ThreadOptions &amp;lt;PSThreadOptions&amp;gt;]
[-StartupScript &amp;lt;String&amp;gt;] [-MaximumReceivedDataSizePerCommandMB &amp;lt;Nullable`1&amp;gt;]
[-MaximumReceivedObjectSizeMB &amp;lt;Nullable`1&amp;gt;] [-SecurityDescriptorSddl &amp;lt;String&amp;gt;]
[-Force] [-NoServiceRestart] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] Set-PSSessionConfiguration
[-Name] &amp;lt;String&amp;gt; [-AssemblyName] &amp;lt;String&amp;gt; [-ConfigurationTypeName] &amp;lt;String&amp;gt;
[-ApplicationBase &amp;lt;String&amp;gt;] [-ThreadApartmentState &amp;lt;ApartmentState&amp;gt;] [-ThreadOptions
&amp;lt;PSThreadOptions&amp;gt;] [-StartupScript &amp;lt;String&amp;gt;] [-MaximumReceivedDataSizePerCommandMB
&amp;lt;Nullable`1&amp;gt;] [-MaximumReceivedObjectSizeMB &amp;lt;Nullable`1&amp;gt;] [-SecurityDescriptorSddl
&amp;lt;String&amp;gt;] [-Force] [-NoServiceRestart] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Enable-PSSessionConfiguration&lt;/td&gt;
&lt;td&gt;
Enable-PSSessionConfiguration [[-Name] &amp;lt;String[]&amp;gt;] [-Force] [-SecurityDescriptorSddl
&amp;lt;String&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Disable-PSSessionConfiguration&lt;/td&gt;
&lt;td&gt;
Disable-PSSessionConfiguration [[-Name] &amp;lt;String[]&amp;gt;] [-Force] [-Verbose] [-Debug]
[-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Register-PSSessionConfiguration&lt;/td&gt;
&lt;td&gt;
Register-PSSessionConfiguration [-Name] &amp;lt;String&amp;gt; [-ProcessorArchitecture &amp;lt;String&amp;gt;]
[-ApplicationBase &amp;lt;String&amp;gt;] [-ThreadApartmentState &amp;lt;ApartmentState&amp;gt;] [-ThreadOptions
&amp;lt;PSThreadOptions&amp;gt;] [-StartupScript &amp;lt;String&amp;gt;] [-MaximumReceivedDataSizePerCommandMB
&amp;lt;Nullable`1&amp;gt;] [-MaximumReceivedObjectSizeMB &amp;lt;Nullable`1&amp;gt;] [-SecurityDescriptorSddl
&amp;lt;String&amp;gt;] [-Force] [-NoServiceRestart] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] Register-PSSessionConfiguration
[-Name] &amp;lt;String&amp;gt; [-AssemblyName] &amp;lt;String&amp;gt; [-ConfigurationTypeName] &amp;lt;String&amp;gt;
[-ProcessorArchitecture &amp;lt;String&amp;gt;] [-ApplicationBase &amp;lt;String&amp;gt;] [-ThreadApartmentState
&amp;lt;ApartmentState&amp;gt;] [-ThreadOptions &amp;lt;PSThreadOptions&amp;gt;] [-StartupScript &amp;lt;String&amp;gt;]
[-MaximumReceivedDataSizePerCommandMB &amp;lt;Nullable`1&amp;gt;] [-MaximumReceivedObjectSizeMB
&amp;lt;Nullable`1&amp;gt;] [-SecurityDescriptorSddl &amp;lt;String&amp;gt;] [-Force] [-NoServiceRestart]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Unregister-PSSessionConfiguration&lt;/td&gt;
&lt;td&gt;
Unregister-PSSessionConfiguration [-Name] &amp;lt;String&amp;gt; [-Force] [-NoServiceRestart]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-PSSessionConfiguration&lt;/td&gt;
&lt;td&gt;
Get-PSSessionConfiguration [[-Name] &amp;lt;String[]&amp;gt;] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-Random&lt;/td&gt;
&lt;td&gt;
Gets a random number or selects objects randomly from a collection.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-StrictMode&lt;/td&gt;
&lt;td&gt;
Establishes and enforces coding rules in expressions, scripts, and script blocks.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
ConvertFrom-StringData&lt;/td&gt;
&lt;td&gt;
Converts a string containing one or more "name=value" pairs to a hash table.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Undo-Transaction&lt;/td&gt;
&lt;td&gt;
Rolls back the active transaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Use-Transaction&lt;/td&gt;
&lt;td&gt;
Adds the script block to the active transaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Complete-Transaction&lt;/td&gt;
&lt;td&gt;
Commits the active transaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-Transaction&lt;/td&gt;
&lt;td&gt;
Gets the current (active) transaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Start-Transaction&lt;/td&gt;
&lt;td&gt;
Starts a transaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Add-Type&lt;/td&gt;
&lt;td&gt;
Adds a .NET type (a class) to a Windows PowerShell session.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-WebServiceProxy&lt;/td&gt;
&lt;td&gt;
Creates a Web service proxy object that lets you use and manage the Web service in
Windows PowerShell.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-WinEvent&lt;/td&gt;
&lt;td&gt;
Gets events from event logs and event tracing log files on local and remote computers.
This cmdlet runs only on Windows Vista and later versions of Windows.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Register-WmiEvent&lt;/td&gt;
&lt;td&gt;
Register-WmiEvent [-Class] &amp;lt;String&amp;gt; [[-SourceIdentifier] &amp;lt;String&amp;gt;] [[-Action]
&amp;lt;ScriptBlock&amp;gt;] [-Namespace &amp;lt;String&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;]
[-ComputerName &amp;lt;String&amp;gt;] [-Timeout &amp;lt;Int64&amp;gt;] [-MessageData &amp;lt;PSObject&amp;gt;]
[-SupportEvent] [-Forward] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] Register-WmiEvent
[-Query] &amp;lt;String&amp;gt; [[-SourceIdentifier] &amp;lt;String&amp;gt;] [[-Action] &amp;lt;ScriptBlock&amp;gt;]
[-Namespace &amp;lt;String&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-ComputerName &amp;lt;String&amp;gt;]
[-Timeout &amp;lt;Int64&amp;gt;] [-MessageData &amp;lt;PSObject&amp;gt;] [-SupportEvent] [-Forward]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-WmiInstance&lt;/td&gt;
&lt;td&gt;
Creates or modifies instances of WMI classes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Invoke-WmiMethod&lt;/td&gt;
&lt;td&gt;
Calls WMI methods.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-WmiObject&lt;/td&gt;
&lt;td&gt;
Deletes WMI classes and instances.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Disconnect-WSMan&lt;/td&gt;
&lt;td&gt;
Disconnect-WSMan [[-ComputerName] &amp;lt;String&amp;gt;] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Connect-WSMan&lt;/td&gt;
&lt;td&gt;
Connect-WSMan [[-ComputerName] &amp;lt;String&amp;gt;] [-ApplicationName &amp;lt;String&amp;gt;] [-Authentication
&amp;lt;AuthenticationMechanism&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;]
[-Port &amp;lt;Int32&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;] [-UseSSL] [-Verbose]
[-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] Connect-WSMan [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;]
[-ConnectionURI &amp;lt;Uri&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;]
[-Port &amp;lt;Int32&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Test-WSMan&lt;/td&gt;
&lt;td&gt;
Test-WSMan [[-ComputerName] &amp;lt;String&amp;gt;] [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;]
[-Credential &amp;lt;PSCredential&amp;gt;] [-Port &amp;lt;Int32&amp;gt;] [-UseSSL] [-ApplicationName
&amp;lt;String&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Invoke-WSManAction&lt;/td&gt;
&lt;td&gt;
Invoke-WSManAction [-ResourceURI] &amp;lt;Uri&amp;gt; [-Action] &amp;lt;String&amp;gt; [[-SelectorSet]
&amp;lt;Hashtable&amp;gt;] [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ConnectionURI
&amp;lt;Uri&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-FilePath &amp;lt;String&amp;gt;] [-OptionSet
&amp;lt;Hashtable&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;] [-ValueSet &amp;lt;Hashtable&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] Invoke-WSManAction [-ResourceURI] &amp;lt;Uri&amp;gt; [-Action]
&amp;lt;String&amp;gt; [[-SelectorSet] &amp;lt;Hashtable&amp;gt;] [-ApplicationName &amp;lt;String&amp;gt;]
[-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ComputerName &amp;lt;String&amp;gt;] [-Credential
&amp;lt;PSCredential&amp;gt;] [-FilePath &amp;lt;String&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;] [-Port
&amp;lt;Int32&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;] [-UseSSL] [-ValueSet &amp;lt;Hashtable&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-WSManCredSSP&lt;/td&gt;
&lt;td&gt;
Get-WSManCredSSP [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Enable-WSManCredSSP&lt;/td&gt;
&lt;td&gt;
Enable-WSManCredSSP [-DelegateComputer] &amp;lt;String[]&amp;gt; [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Disable-WSManCredSSP&lt;/td&gt;
&lt;td&gt;
Disable-WSManCredSSP [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Remove-WSManInstance&lt;/td&gt;
&lt;td&gt;
Remove-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [-SelectorSet] &amp;lt;Hashtable&amp;gt; [-ApplicationName
&amp;lt;String&amp;gt;] [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ComputerName &amp;lt;String&amp;gt;]
[-Credential &amp;lt;PSCredential&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;] [-Port &amp;lt;Int32&amp;gt;]
[-SessionOption &amp;lt;SessionOption&amp;gt;] [-UseSSL] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] Remove-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [-SelectorSet] &amp;lt;Hashtable&amp;gt;
[-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ConnectionURI &amp;lt;Uri&amp;gt;] [-Credential
&amp;lt;PSCredential&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-WSManInstance&lt;/td&gt;
&lt;td&gt;
New-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [-SelectorSet] &amp;lt;Hashtable&amp;gt; [-ApplicationName
&amp;lt;String&amp;gt;] [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ComputerName &amp;lt;String&amp;gt;]
[-Credential &amp;lt;PSCredential&amp;gt;] [-FilePath &amp;lt;String&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;]
[-Port &amp;lt;Int32&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;] [-UseSSL] [-ValueSet
&amp;lt;Hashtable&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] New-WSManInstance [-ResourceURI]
&amp;lt;Uri&amp;gt; [-SelectorSet] &amp;lt;Hashtable&amp;gt; [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;]
[-ConnectionURI &amp;lt;Uri&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-FilePath &amp;lt;String&amp;gt;]
[-OptionSet &amp;lt;Hashtable&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;] [-ValueSet &amp;lt;Hashtable&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Get-WSManInstance&lt;/td&gt;
&lt;td&gt;
Get-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [-ApplicationName &amp;lt;String&amp;gt;] [-Authentication
&amp;lt;AuthenticationMechanism&amp;gt;] [-ComputerName &amp;lt;String&amp;gt;] [-ConnectionURI &amp;lt;Uri&amp;gt;]
[-Credential &amp;lt;PSCredential&amp;gt;] [-Dialect &amp;lt;Uri&amp;gt;] [-Fragment &amp;lt;String&amp;gt;]
[-OptionSet &amp;lt;Hashtable&amp;gt;] [-Port &amp;lt;Int32&amp;gt;] [-SelectorSet &amp;lt;Hashtable&amp;gt;]
[-SessionOption &amp;lt;SessionOption&amp;gt;] [-UseSSL] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] Get-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [-ApplicationName &amp;lt;String&amp;gt;]
[-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-BasePropertiesOnly] [-ComputerName
&amp;lt;String&amp;gt;] [-ConnectionURI &amp;lt;Uri&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-Dialect
&amp;lt;Uri&amp;gt;] -Enumerate [-Filter &amp;lt;String&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;] [-Port
&amp;lt;Int32&amp;gt;] [-References] [-ReturnType &amp;lt;String&amp;gt;] [-SessionOption &amp;lt;SessionOption&amp;gt;]
[-Shallow] [-UseSSL] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction
&amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;]
[-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-WSManInstance&lt;/td&gt;
&lt;td&gt;
Set-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [[-SelectorSet] &amp;lt;Hashtable&amp;gt;] [-ApplicationName
&amp;lt;String&amp;gt;] [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ComputerName &amp;lt;String&amp;gt;]
[-Credential &amp;lt;PSCredential&amp;gt;] [-Dialect &amp;lt;Uri&amp;gt;] [-FilePath &amp;lt;String&amp;gt;]
[-Fragment &amp;lt;String&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;] [-Port &amp;lt;Int32&amp;gt;] [-SessionOption
&amp;lt;SessionOption&amp;gt;] [-UseSSL] [-ValueSet &amp;lt;Hashtable&amp;gt;] [-Verbose] [-Debug]
[-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] Set-WSManInstance [-ResourceURI] &amp;lt;Uri&amp;gt; [[-SelectorSet]
&amp;lt;Hashtable&amp;gt;] [-Authentication &amp;lt;AuthenticationMechanism&amp;gt;] [-ConnectionURI
&amp;lt;Uri&amp;gt;] [-Credential &amp;lt;PSCredential&amp;gt;] [-Dialect &amp;lt;Uri&amp;gt;] [-FilePath
&amp;lt;String&amp;gt;] [-Fragment &amp;lt;String&amp;gt;] [-OptionSet &amp;lt;Hashtable&amp;gt;] [-SessionOption
&amp;lt;SessionOption&amp;gt;] [-ValueSet &amp;lt;Hashtable&amp;gt;] [-Verbose] [-Debug] [-ErrorAction
&amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable
&amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer
&amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Set-WSManQuickConfig&lt;/td&gt;
&lt;td&gt;
Set-WSManQuickConfig [-UseSSL] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
New-WSManSessionOption&lt;/td&gt;
&lt;td&gt;
New-WSManSessionOption [-ProxyAccessType &amp;lt;ProxyAccessType&amp;gt;] [-ProxyAuthentication
&amp;lt;ProxyAuthentication&amp;gt;] [-ProxyCredential &amp;lt;PSCredential&amp;gt;] [-SkipCACheck]
[-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort &amp;lt;Int32&amp;gt;] [-OperationTimeout
&amp;lt;Int32&amp;gt;] [-NoEncryption] [-UseUTF16] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Select-Xml&lt;/td&gt;
&lt;td&gt;
Select-Xml [-XPath] &amp;lt;String&amp;gt; [-Path] &amp;lt;String[]&amp;gt; [-Namespace &amp;lt;Hashtable&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] Select-Xml [-XPath] &amp;lt;String&amp;gt; [-Xml] &amp;lt;XmlNode[]&amp;gt;
[-Namespace &amp;lt;Hashtable&amp;gt;] [-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;]
[-WarningAction &amp;lt;ActionPreference&amp;gt;] [-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable
&amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;] [-OutBuffer &amp;lt;Int32&amp;gt;] Select-Xml
[-XPath] &amp;lt;String&amp;gt; [-Content] &amp;lt;String[]&amp;gt; [-Namespace &amp;lt;Hashtable&amp;gt;]
[-Verbose] [-Debug] [-ErrorAction &amp;lt;ActionPreference&amp;gt;] [-WarningAction &amp;lt;ActionPreference&amp;gt;]
[-ErrorVariable &amp;lt;String&amp;gt;] [-WarningVariable &amp;lt;String&amp;gt;] [-OutVariable &amp;lt;String&amp;gt;]
[-OutBuffer &amp;lt;Int32&amp;gt;] 
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
ConvertTo-Xml&lt;/td&gt;
&lt;td&gt;
Creates an XML-based representation of an object.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Whew, that’s quite a few. Now, onto the API.
&lt;/p&gt;
&lt;h4&gt;.NET API Differences
&lt;/h4&gt;
&lt;p&gt;
This time, I’m just dumping out the namespaces and Types per namespace. It would be
a bit much to dump out all the Types themselves. The one-liner:
&lt;/p&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="variable"&gt;$v1&lt;/span&gt;&lt;span&gt;.api | group namespace | select name,
count | convertto-html -fragment &amp;gt; .\v1-types.htm&amp;nbsp; &lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;strong&gt;v1.0 RTM API &lt;/strong&gt; 
&lt;p&gt;
Here are the namspaces and respective public Type count for v1.0:
&lt;/p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col&gt;
&lt;col&gt;
&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;
Name&lt;/th&gt;
&lt;th&gt;
Count&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands&lt;/td&gt;
&lt;td&gt;
196&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell&lt;/td&gt;
&lt;td&gt;
11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands.Internal.Format&lt;/td&gt;
&lt;td&gt;
4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation&lt;/td&gt;
&lt;td&gt;
169&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Internal&lt;/td&gt;
&lt;td&gt;
6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Host&lt;/td&gt;
&lt;td&gt;
15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Runspaces&lt;/td&gt;
&lt;td&gt;
33&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Provider&lt;/td&gt;
&lt;td&gt;
13&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&lt;strong&gt;v2.0 CTP3 API &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Here are the namspaces and respective public Type count for v2.0 CTP3:
&lt;/p&gt;
&lt;table&gt;
&lt;colgroup&gt;
&lt;col&gt;
&lt;col&gt;
&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;
Name&lt;/th&gt;
&lt;th&gt;
Count&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands&lt;/td&gt;
&lt;td&gt;
311&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands.GetCounter&lt;/td&gt;
&lt;td&gt;
4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell&lt;/td&gt;
&lt;td&gt;
14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands.Internal.Format&lt;/td&gt;
&lt;td&gt;
4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.WSMan.Management&lt;/td&gt;
&lt;td&gt;
40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation&lt;/td&gt;
&lt;td&gt;
262&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Internal&lt;/td&gt;
&lt;td&gt;
7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Runspaces&lt;/td&gt;
&lt;td&gt;
61&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Host&lt;/td&gt;
&lt;td&gt;
17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Remoting&lt;/td&gt;
&lt;td&gt;
10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
System.Management.Automation.Provider&lt;/td&gt;
&lt;td&gt;
14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands.Internal&lt;/td&gt;
&lt;td&gt;
4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Microsoft.PowerShell.Commands.Management&lt;/td&gt;
&lt;td&gt;
1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
As you can see, there has been a nice expansion of namespaces and Types to work with,
mostly coming from the sterling work being done to generalize the “Jobs” infrastructure.
Also, a fair chunk is tied up with the refactoring and reorganizing of Runspaces to
allow for jobs (which also covers eventing), remoting and background pipelines. This
is something I will cover in more detail in a future post.
&lt;/p&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=f33b33fb-273a-4c45-9695-cdcc0c768aaf" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,f33b33fb-273a-4c45-9695-cdcc0c768aaf.aspx</comments>
      <category>.NET</category>
      <category>Cmdlets</category>
      <category>CTP3</category>
      <category>Modules</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=846a72ce-4e85-49b5-bfb6-09e2080db40b</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,846a72ce-4e85-49b5-bfb6-09e2080db40b.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,846a72ce-4e85-49b5-bfb6-09e2080db40b.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=846a72ce-4e85-49b5-bfb6-09e2080db40b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <!-- Stylesheet link -->
        <link href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" />
        <p>
You might have noticed these two accelerators in the list I published recently along
with the technique how to add your own type accelerators. It’s not immediately clear
that they are related, but they very much are. This is going to be a fairly developer-oriented
post, so there won’t be any hand-holding here. 
</p>
        <h4>[PowerShell]
</h4>
        <p>
The [PowerShell] accelerator is aliased to System.Management.Automation.PowerShell.
It has one static method, Create(), which returns an instance of the class itself.
In v1, if you wanted to set up asynchronous pipelines and do other fancy stuff, you
had to get your hands dirty with Runspace and Pipeline instances and know how to wire
them all together. The [PowerShell] class makes it a lot easier to do this; think
of it a “PowerShell Pipeline Runner” class. At its simplest, you can just “new up”
an instance, assign some script using the AddScript method and call Invoke(). You
can run this asynchronously using the BeginInvoke/EndInvoke pattern which should be
familiar to all .NET developers who’ve done a bit of threading work. 
</p>
        <p>
          <!-- Code -->
        </p>
        <div class="dp-highlighter" id="hlDiv">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span class="comment"># create a new pipeline </span>
                <span>  </span>
              </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="variable">$ps</span>
              <span> = [powershell]:</span>
              <span class="symbol">:create</span>
              <span>()   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="comment"># add a command (returns Command object) </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>[void] </span>
              <span class="variable">$ps</span>
              <span>.AddScript(</span>
              <span class="string">"ls"</span>
              <span>)   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="comment"># invoke synchronously, returning results of "ls." </span>
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="variable">$results</span>
              <span> = </span>
              <span class="variable">$ps</span>
              <span>.Invoke()   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="comment"># clean up </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="variable">$ps</span>
              <span>.dispose()  </span>
            </li>
          </ol>
        </div>
        <p>
        </p>
        <h4>[RunspaceFactory]
</h4>
        <p>
This accelerator is aliased to System.Management.Automation.Runspaces.RunspaceFactory.
It has two static methods of interest, CreateRunspace and CreateRunspacePool. I’m
going to focus on the latter because it has more interesting uses which you will see.
This latter method lets you create a collection of Runspace instances that are essentially
reusable. The great thing is that you don’t have to worry about any of the details.
It just works; this leads me to the next part: queuing local pipeline jobs to be run
in the background. 
</p>
        <p>
The pool you create can be constrained in many ways by using the various overloads
of the CreateRunspacePool. You can even pass it a RunspaceConnectionInfo object so
that the queued pipelines are run on remote servers. This is done by using the New-PSSession
cmdlet to create a session to a remote machine running PowerShell 2.0 with WinRM configured
correctly.
</p>
        <h4>Queueing Pipelines to a Runspace Pool
</h4>
        <p>
This is where the magic really happens. Simply new up a PowerShell instance, assign
the pool to it and run a command. New up as many PowerShell instnaces as you like,
and as long as you assign each of them the same pool, the pool automagically looks
after processing them as fast as it can and will never go over its hard limits you
give it for the number of simultaneous runspaces. In this next script, I set up a
pool of three runspaces. I then queue up six pipelines to be run. I am using the BeginInvoke
method to start the command in the background. You’ll see when it runs that each command
will make a beep of a certain frequency when it finally starts up. You can hear the
first three jobs start up pretty much straight away, as each completes, another starts
up. Magic!
</p>
        <p>
        </p>
        <div class="dp-highlighter" id="hlDiv">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span class="comment">#require -version 2.0 </span>
                <span>  </span>
              </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="comment"># create a pool of 3 runspaces </span>
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="variable">$pool</span>
              <span> = [runspacefactory]::CreateRunspacePool(1,
3)   </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="variable">$pool</span>
              <span>.Open()   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>write-host </span>
              <span class="string">"Available Runspaces: $($pool.GetAvailableRunspaces())"</span>
              <span>  </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="variable">$jobs</span>
              <span> = @()   </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="variable">$ps</span>
              <span> = @()   </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="variable">$wait</span>
              <span> = @()   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="comment"># run 6 background pipelines </span>
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="keyword">for</span>
              <span> (</span>
              <span class="variable">$i</span>
              <span> =
0; </span>
              <span class="variable">$i</span>
              <span> -lt 6; </span>
              <span class="variable">$i</span>
              <span>++)
{   </span>
            </li>
            <li class="alt">
              <span>      </span>
            </li>
            <li class="">
              <span>   </span>
              <span class="comment"># create a "powershell pipeline runner" </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="variable">$ps</span>
              <span> += [powershell]:</span>
              <span class="symbol">:create</span>
              <span>()   </span>
            </li>
            <li class="">
              <span>      </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="comment"># assign our pool of 3 runspaces to
use </span>
              <span>  </span>
            </li>
            <li class="">
              <span>   </span>
              <span class="variable">$ps</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>].runspacepool
= </span>
              <span class="variable">$pool</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>      </span>
            </li>
            <li class="">
              <span>   </span>
              <span class="variable">$freq</span>
              <span> = 440 + (</span>
              <span class="variable">$i</span>
              <span> *
10)   </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="variable">$sleep</span>
              <span> = (1 * (</span>
              <span class="variable">$i</span>
              <span> +
1))   </span>
            </li>
            <li class="">
              <span>      </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="comment"># test command: beep and wait a certain
time </span>
              <span>  </span>
            </li>
            <li class="">
              <span>   [void]</span>
              <span class="variable">$ps</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>].AddScript(   </span>
            </li>
            <li class="alt">
              <span>        </span>
              <span class="string">"[console]::Beep($freq,
30); sleep -seconds $sleep"</span>
              <span>)   </span>
            </li>
            <li class="">
              <span>      </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="comment"># start job </span>
              <span>  </span>
            </li>
            <li class="">
              <span>   write-host </span>
              <span class="string">"Job $i will run for $sleep
second(s)"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="variable">$jobs</span>
              <span> += </span>
              <span class="variable">$ps</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>].BeginInvoke();   </span>
            </li>
            <li class="">
              <span>      </span>
            </li>
            <li class="alt">
              <span>   write-host </span>
              <span class="string">"Available runspaces: $($pool.GetAvailableRunspaces())"</span>
              <span>  </span>
            </li>
            <li class="">
              <span>      </span>
            </li>
            <li class="alt">
              <span>   </span>
              <span class="comment"># store wait handles for WaitForAll
call </span>
              <span>  </span>
            </li>
            <li class="">
              <span>   </span>
              <span class="variable">$wait</span>
              <span> += </span>
              <span class="variable">$jobs</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>].AsyncWaitHandle   </span>
            </li>
            <li class="alt">
              <span>}   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="comment"># wait 20 seconds for all jobs to complete, else
abort </span>
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="variable">$success</span>
              <span> = [System.Threading.WaitHandle]::WaitAll(</span>
              <span class="variable">$wait</span>
              <span>,
20000)   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>write-host </span>
              <span class="string">"All completed? $success"</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="comment"># end async call </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="keyword">for</span>
              <span> (</span>
              <span class="variable">$i</span>
              <span> =
0; </span>
              <span class="variable">$i</span>
              <span> -lt 6; </span>
              <span class="variable">$i</span>
              <span>++)
{   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>    write-host </span>
              <span class="string">"Completing async
pipeline job $i"</span>
              <span>  </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>    try {   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>        </span>
              <span class="comment"># complete
async job </span>
              <span>  </span>
            </li>
            <li class="">
              <span>        </span>
              <span class="variable">$ps</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>].EndInvoke(</span>
              <span class="variable">$jobs</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>])   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>    } catch {   </span>
            </li>
            <li class="alt">
              <span>       </span>
            </li>
            <li class="">
              <span>        </span>
              <span class="comment"># oops-ee! </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>        write-warning </span>
              <span class="string">"error:
$_"</span>
              <span>  </span>
            </li>
            <li class="">
              <span>    }   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>    </span>
              <span class="comment"># dump info about completed
pipelines </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="variable">$info</span>
              <span> = </span>
              <span class="variable">$ps</span>
              <span>[</span>
              <span class="variable">$i</span>
              <span>].InvocationStateInfo   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>    write-host </span>
              <span class="string">"State: $($info.state)
; Reason: $($info.reason)"</span>
              <span>  </span>
            </li>
            <li class="">
              <span>}   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="comment"># should show 3 again. </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>write-host </span>
              <span class="string">"Available runspaces: $($pool.GetAvailableRunspaces())"</span>
              <span>  </span>
            </li>
          </ol>
        </div>
        <p>
        </p>
        <p>
Feel free to post questions or requests for clarification, but I did say it was a
bit tough and developer-oriented. I have a hint that our good friend and fellow MVP, <a href="http://karlprosser.com/coder/" target="_blank">Karl
Prosser</a> (aka Klumsy), will be wrapping up some of this stuff into some nice admin-oriented
background  command functions. 
</p>
        <p>
          <strong>IMPORTANT:</strong>
        </p>
        <p>
          <em>Due to the WaitAll call at line 40, this script will <strong>not</strong> work
in an STA thread (i.e. in PowerShell ISE). Use PowerShell.EXE to run this script.
Everything else will work in ISE fine.</em>
        </p>
        <p>
Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=846a72ce-4e85-49b5-bfb6-09e2080db40b" />
      </body>
      <title>CTP3: The [RunspaceFactory] and [PowerShell] Accelerators</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,846a72ce-4e85-49b5-bfb6-09e2080db40b.aspx</guid>
      <link>http://www.nivot.org/2009/01/22/CTP3TheRunspaceFactoryAndPowerShellAccelerators.aspx</link>
      <pubDate>Thu, 22 Jan 2009 19:38:03 GMT</pubDate>
      <description>&lt;!-- Stylesheet link --&gt;
&lt;link href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet"&gt;
&lt;p&gt;
You might have noticed these two accelerators in the list I published recently along
with the technique how to add your own type accelerators. It’s not immediately clear
that they are related, but they very much are. This is going to be a fairly developer-oriented
post, so there won’t be any hand-holding here. 
&lt;/p&gt;
&lt;h4&gt;[PowerShell]
&lt;/h4&gt;
&lt;p&gt;
The [PowerShell] accelerator is aliased to System.Management.Automation.PowerShell.
It has one static method, Create(), which returns an instance of the class itself.
In v1, if you wanted to set up asynchronous pipelines and do other fancy stuff, you
had to get your hands dirty with Runspace and Pipeline instances and know how to wire
them all together. The [PowerShell] class makes it a lot easier to do this; think
of it a “PowerShell Pipeline Runner” class. At its simplest, you can just “new up”
an instance, assign some script using the AddScript method and call Invoke(). You
can run this asynchronously using the BeginInvoke/EndInvoke pattern which should be
familiar to all .NET developers who’ve done a bit of threading work. 
&lt;/p&gt;
&lt;p&gt;
&lt;!-- Code --&gt;
&lt;/p&gt;
&lt;div class="dp-highlighter" id="hlDiv"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="comment"&gt;# create a new pipeline &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt; = [powershell]:&lt;/span&gt;&lt;span class="symbol"&gt;:create&lt;/span&gt;&lt;span&gt;()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# add a command (returns Command object) &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;[void] &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;.AddScript(&lt;/span&gt;&lt;span class="string"&gt;"ls"&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# invoke synchronously, returning results of "ls." &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$results&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;.Invoke()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# clean up &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;.dispose()&amp;nbsp; &lt;/span&gt;&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h4&gt;[RunspaceFactory]
&lt;/h4&gt;
&lt;p&gt;
This accelerator is aliased to System.Management.Automation.Runspaces.RunspaceFactory.
It has two static methods of interest, CreateRunspace and CreateRunspacePool. I’m
going to focus on the latter because it has more interesting uses which you will see.
This latter method lets you create a collection of Runspace instances that are essentially
reusable. The great thing is that you don’t have to worry about any of the details.
It just works; this leads me to the next part: queuing local pipeline jobs to be run
in the background. 
&lt;/p&gt;
&lt;p&gt;
The pool you create can be constrained in many ways by using the various overloads
of the CreateRunspacePool. You can even pass it a RunspaceConnectionInfo object so
that the queued pipelines are run on remote servers. This is done by using the New-PSSession
cmdlet to create a session to a remote machine running PowerShell 2.0 with WinRM configured
correctly.
&lt;/p&gt;
&lt;h4&gt;Queueing Pipelines to a Runspace Pool
&lt;/h4&gt;
&lt;p&gt;
This is where the magic really happens. Simply new up a PowerShell instance, assign
the pool to it and run a command. New up as many PowerShell instnaces as you like,
and as long as you assign each of them the same pool, the pool automagically looks
after processing them as fast as it can and will never go over its hard limits you
give it for the number of simultaneous runspaces. In this next script, I set up a
pool of three runspaces. I then queue up six pipelines to be run. I am using the BeginInvoke
method to start the command in the background. You’ll see when it runs that each command
will make a beep of a certain frequency when it finally starts up. You can hear the
first three jobs start up pretty much straight away, as each completes, another starts
up. Magic!
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="dp-highlighter" id="hlDiv"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="comment"&gt;#require -version 2.0 &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# create a pool of 3 runspaces &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$pool&lt;/span&gt;&lt;span&gt; = [runspacefactory]::CreateRunspacePool(1,
3)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$pool&lt;/span&gt;&lt;span&gt;.Open()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;write-host &lt;/span&gt;&lt;span class="string"&gt;"Available Runspaces: $($pool.GetAvailableRunspaces())"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$jobs&lt;/span&gt;&lt;span&gt; = @()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt; = @()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$wait&lt;/span&gt;&lt;span&gt; = @()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# run 6 background pipelines &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;for&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt; =
0; &lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt; -lt 6; &lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;++)
{&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# create a "powershell pipeline runner" &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt; += [powershell]:&lt;/span&gt;&lt;span class="symbol"&gt;:create&lt;/span&gt;&lt;span&gt;()&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# assign our pool of 3 runspaces to
use &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;].runspacepool
= &lt;/span&gt;&lt;span class="variable"&gt;$pool&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$freq&lt;/span&gt;&lt;span&gt; = 440 + (&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt; *
10)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$sleep&lt;/span&gt;&lt;span&gt; = (1 * (&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt; +
1))&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# test command: beep and wait a certain
time &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; [void]&lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;].AddScript(&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="string"&gt;"[console]::Beep($freq,
30); sleep -seconds $sleep"&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# start job &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; write-host &lt;/span&gt;&lt;span class="string"&gt;"Job $i will run for $sleep
second(s)"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$jobs&lt;/span&gt;&lt;span&gt; += &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;].BeginInvoke();&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; write-host &lt;/span&gt;&lt;span class="string"&gt;"Available runspaces: $($pool.GetAvailableRunspaces())"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# store wait handles for WaitForAll
call &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$wait&lt;/span&gt;&lt;span&gt; += &lt;/span&gt;&lt;span class="variable"&gt;$jobs&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;].AsyncWaitHandle&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;}&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# wait 20 seconds for all jobs to complete, else
abort &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$success&lt;/span&gt;&lt;span&gt; = [System.Threading.WaitHandle]::WaitAll(&lt;/span&gt;&lt;span class="variable"&gt;$wait&lt;/span&gt;&lt;span&gt;,
20000)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;write-host &lt;/span&gt;&lt;span class="string"&gt;"All completed? $success"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# end async call &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;for&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt; =
0; &lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt; -lt 6; &lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;++)
{&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host &lt;/span&gt;&lt;span class="string"&gt;"Completing async
pipeline job $i"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# complete
async job &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;].EndInvoke(&lt;/span&gt;&lt;span class="variable"&gt;$jobs&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;])&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch {&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# oops-ee! &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-warning &lt;/span&gt;&lt;span class="string"&gt;"error:
$_"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# dump info about completed
pipelines &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$info&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span class="variable"&gt;$ps&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span class="variable"&gt;$i&lt;/span&gt;&lt;span&gt;].InvocationStateInfo&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host &lt;/span&gt;&lt;span class="string"&gt;"State: $($info.state)
; Reason: $($info.reason)"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;}&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# should show 3 again. &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;write-host &lt;/span&gt;&lt;span class="string"&gt;"Available runspaces: $($pool.GetAvailableRunspaces())"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Feel free to post questions or requests for clarification, but I did say it was a
bit tough and developer-oriented. I have a hint that our good friend and fellow MVP, &lt;a href="http://karlprosser.com/coder/" target="_blank"&gt;Karl
Prosser&lt;/a&gt; (aka Klumsy), will be wrapping up some of this stuff into some nice admin-oriented
background&amp;nbsp; command functions. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;IMPORTANT:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Due to the WaitAll call at line 40, this script will &lt;strong&gt;not&lt;/strong&gt; work
in an STA thread (i.e. in PowerShell ISE). Use PowerShell.EXE to run this script.
Everything else will work in ISE fine.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=846a72ce-4e85-49b5-bfb6-09e2080db40b" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,846a72ce-4e85-49b5-bfb6-09e2080db40b.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=6a9658f1-6559-4598-bb02-dbc573416a1d</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,6a9658f1-6559-4598-bb02-dbc573416a1d.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,6a9658f1-6559-4598-bb02-dbc573416a1d.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=6a9658f1-6559-4598-bb02-dbc573416a1d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="left">
A module manifest file is a PowerShell data file (.psd1) with the same name as the
module directory. For example, the FileTransfer module installed with CTP3 -- which
contains Cmdlets for BITS -- is in a directory called $pshome\Modules\FileTransfer
and contains a manifest file called $pshome\Modules\FileTransfer\FileTransfer.psd1.
Module manifests are optional, but highly recommended.
</p>
        <p align="left">
A module manifest contains a hashtable declared using the @{} hashtable literal syntax.
Valid keys are listed in the following table:
</p>
        <style>
          <!--
table tr td p { align: left }
-->
        </style>
        <p align="left">
          <table border="1" cellspacing="0" cellpadding="0">
            <tbody>
              <tr>
                <td width="208" align="middle">
                  <p>
                    <b>Key</b>
                  </p>
                </td>
                <td width="93" align="middle">
                  <p>
                    <b>Required</b>
                  </p>
                </td>
                <td width="125" align="middle">
                  <p>
                    <b>Type</b>
                  </p>
                </td>
                <td width="231" align="middle">
                  <p>
                    <b>Description</b>
                  </p>
                </td>
              </tr>
              <tr>
                <td width="227">
                  <p>
ModuleToProcess
</p>
                </td>
                <td width="99">
                  <p>
Optional
</p>
                </td>
                <td width="132">
                  <p>
String
</p>
                </td>
                <td width="231">
                  <p>
Script module or binary module file associated with this manifest which also becomes
the root module for nested modules. If no module is specified, the manifest itself
becomes the root module for nested modules.
</p>
                  <p>
                    <strong>A binary module is the new name for a snap-in DLL. v1 style snapins can be
loaded this way, without having to register them first with installutil.exe; A binary
module does NOT need a PSSnapIn class defined.</strong>
                  </p>
                </td>
              </tr>
              <tr>
                <td width="232">
                  <p>
ModuleVersion
</p>
                </td>
                <td width="102">
                  <p>
                    <b>Required</b>
                  </p>
                </td>
                <td width="134">
                  <p align="left">
String convertible to System.Version
</p>
                </td>
                <td width="231">
                  <p>
Version of the module
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
GUID
</p>
                </td>
                <td width="104">
                  <p>
Optional
</p>
                </td>
                <td width="135">
                  <p>
String
</p>
                </td>
                <td width="231">
                  <p>
Unique identifier for the module which can be used to verify against the module name
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
Author
</p>
                </td>
                <td width="105">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String
</p>
                </td>
                <td width="231">
                  <p>
Identifies the author of the module
</p>
                </td>
              </tr>
              <tr>
                <td width="231">
                  <p>
CompanyName
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String
</p>
                </td>
                <td width="231">
                  <p>
Identifies the company that created the module
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
Copyright
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String
</p>
                </td>
                <td width="231">
                  <p>
Module copyright
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
Description
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String
</p>
                </td>
                <td width="231">
                  <p>
Describes the contents of the module
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
PowerShellVersion
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
String convertible to System.Version
</p>
                </td>
                <td width="231">
                  <p>
Minimum required version of the PowerShell engine
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
CLRVersion
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
String convertible to System.Version
</p>
                </td>
                <td width="231">
                  <p>
Minimum required version of the CLR
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
RequiredModules
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
List of module names
</p>
                </td>
                <td width="231">
                  <p>
List of modules that must already be loaded globally (note: <strong>required modules
are not loaded automatically</strong> - this could optionally be done using a script
in ScriptsToProcess). 
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
RequiredAssemblies
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String array
</p>
                </td>
                <td width="231">
                  <p>
List of assemblies that will be loaded using the same algorithm as Add-Type
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
ScriptsToProcess
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String array
</p>
                </td>
                <td width="231">
                  <p>
Identifies the list of scripts to process when the module is imported. <strong>These
scripts are dot sourced into the caller’s environment.</strong> Only .ps1 files can
be specified.
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
TypesToProcess
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String array
</p>
                </td>
                <td width="231">
                  <p>
List of .ps1xml type files to process using Update-TypeData
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
FormatsToProcess
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String array
</p>
                </td>
                <td width="231">
                  <p>
List of .ps1xml format files to process using Update-FormatData
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
NestedModules
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
String array
</p>
                </td>
                <td width="231">
                  <p>
List of .ps1, .psm1, .psd1, and .dll files to process on Import-Module. <strong>Files
are processed in the order listed.</strong><strong>DLLs are scraped for cmdlets/providers
and .ps1 script files are dot sourced into the module’s session state.</strong></p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
ExportedFunctions
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
String array, wildcards supported
</p>
                </td>
                <td width="231">
                  <p>
List of functions to export. If not defined or if asterisk is specified, all functions
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
ExportedCmdlets
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
String array, wildcards supported
</p>
                </td>
                <td width="231">
                  <p>
List of cmdlets to export. If not defined or if asterisk is specified, all cmdlets
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
</p>
                  <p>
                    <strong>A big change in CTP3 is that binary Cmdlets can now be scoped – previously
they were always global.</strong>
                  </p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
ExportedVariables
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
String array, wildcards supported
</p>
                </td>
                <td width="231">
                  <p>
List of variables to export. If not defined or if asterisk is specified, all variables
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
ExportedAliases
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p align="left">
String array, wildcards supported
</p>
                </td>
                <td width="231">
                  <p>
List of aliases to export. If not defined or if asterisk is specified, all aliases
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
</p>
                </td>
              </tr>
              <tr>
                <td width="233">
                  <p>
PrivateData
</p>
                </td>
                <td width="106">
                  <p>
Optional
</p>
                </td>
                <td width="136">
                  <p>
Object
</p>
                </td>
                <td width="231">
                  <p>
Data to be passed to the module via the manifest file.
</p>
                </td>
              </tr>
            </tbody>
          </table>
        </p>
        <p>
I’ve highlighted certain things in the description that are important to note. These
are the things that might trip you up.
</p>
        <p>
Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=6a9658f1-6559-4598-bb02-dbc573416a1d" />
      </body>
      <title>PowerShell CTP3 and Module Manifests</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,6a9658f1-6559-4598-bb02-dbc573416a1d.aspx</guid>
      <link>http://www.nivot.org/2008/12/30/PowerShellCTP3AndModuleManifests.aspx</link>
      <pubDate>Tue, 30 Dec 2008 16:48:20 GMT</pubDate>
      <description>&lt;p align="left"&gt;
A module manifest file is a PowerShell data file (.psd1) with the same name as the
module directory. For example, the FileTransfer module installed with CTP3 -- which
contains Cmdlets for BITS -- is in a directory called $pshome\Modules\FileTransfer
and contains a manifest file called $pshome\Modules\FileTransfer\FileTransfer.psd1.
Module manifests are optional, but highly recommended.
&lt;/p&gt;
&lt;p align="left"&gt;
A module manifest contains a hashtable declared using the @{} hashtable literal syntax.
Valid keys are listed in the following table:
&lt;/p&gt;
&lt;style&gt;&lt;!--
table tr td p { align: left }
--&gt;&lt;/style&gt;
&lt;p align="left"&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="208" align="middle"&gt;
&lt;p&gt;
&lt;b&gt;Key&lt;/b&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="93" align="middle"&gt;
&lt;p&gt;
&lt;b&gt;Required&lt;/b&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="125" align="middle"&gt;
&lt;p&gt;
&lt;b&gt;Type&lt;/b&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231" align="middle"&gt;
&lt;p&gt;
&lt;b&gt;Description&lt;/b&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="227"&gt;
&lt;p&gt;
ModuleToProcess
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="99"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="132"&gt;
&lt;p&gt;
String
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Script module or binary module file associated with this manifest which also becomes
the root module for nested modules. If no module is specified, the manifest itself
becomes the root module for nested modules.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;A binary module is the new name for a snap-in DLL. v1 style snapins can be
loaded this way, without having to register them first with installutil.exe; A binary
module does NOT need a PSSnapIn class defined.&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="232"&gt;
&lt;p&gt;
ModuleVersion
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="102"&gt;
&lt;p&gt;
&lt;b&gt;Required&lt;/b&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="134"&gt;
&lt;p align="left"&gt;
String convertible to System.Version
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Version of the module
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
GUID
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="104"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="135"&gt;
&lt;p&gt;
String
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Unique identifier for the module which can be used to verify against the module name
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
Author
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="105"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Identifies the author of the module
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="231"&gt;
&lt;p&gt;
CompanyName
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Identifies the company that created the module
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
Copyright
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Module copyright
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
Description
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Describes the contents of the module
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
PowerShellVersion
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
String convertible to System.Version
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Minimum required version of the PowerShell engine
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
CLRVersion
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
String convertible to System.Version
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Minimum required version of the CLR
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
RequiredModules
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
List of module names
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of modules that must already be loaded globally (note: &lt;strong&gt;required modules
are not loaded automatically&lt;/strong&gt; - this could optionally be done using a script
in ScriptsToProcess). 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
RequiredAssemblies
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String array
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of assemblies that will be loaded using the same algorithm as Add-Type
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
ScriptsToProcess
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String array
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Identifies the list of scripts to process when the module is imported. &lt;strong&gt;These
scripts are dot sourced into the caller’s environment.&lt;/strong&gt; Only .ps1 files can
be specified.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
TypesToProcess
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String array
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of .ps1xml type files to process using Update-TypeData
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
FormatsToProcess
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String array
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of .ps1xml format files to process using Update-FormatData
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
NestedModules
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
String array
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of .ps1, .psm1, .psd1, and .dll files to process on Import-Module. &lt;strong&gt;Files
are processed in the order listed.&lt;/strong&gt; &lt;strong&gt;DLLs are scraped for cmdlets/providers
and .ps1 script files are dot sourced into the module’s session state.&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
ExportedFunctions
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
String array, wildcards supported
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of functions to export. If not defined or if asterisk is specified, all functions
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
ExportedCmdlets
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
String array, wildcards supported
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of cmdlets to export. If not defined or if asterisk is specified, all cmdlets
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;A big change in CTP3 is that binary Cmdlets can now be scoped – previously
they were always global.&lt;/strong&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
ExportedVariables
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
String array, wildcards supported
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of variables to export. If not defined or if asterisk is specified, all variables
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
ExportedAliases
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p align="left"&gt;
String array, wildcards supported
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
List of aliases to export. If not defined or if asterisk is specified, all aliases
imported from nested modules are re‑exported. To prevent export, use the empty string
‘’.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="233"&gt;
&lt;p&gt;
PrivateData
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="106"&gt;
&lt;p&gt;
Optional
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="136"&gt;
&lt;p&gt;
Object
&lt;/p&gt;
&lt;/td&gt;
&lt;td width="231"&gt;
&lt;p&gt;
Data to be passed to the module via the manifest file.
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;
I’ve highlighted certain things in the description that are important to note. These
are the things that might trip you up.
&lt;/p&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=6a9658f1-6559-4598-bb02-dbc573416a1d" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,6a9658f1-6559-4598-bb02-dbc573416a1d.aspx</comments>
      <category>CTP3</category>
      <category>Modules</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=15c3cda2-1805-461c-ac91-6076a61180f2</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,15c3cda2-1805-461c-ac91-6076a61180f2.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,15c3cda2-1805-461c-ac91-6076a61180f2.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=15c3cda2-1805-461c-ac91-6076a61180f2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Meson tweeted a request asking if it was possible to get a list of language keywords
from <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell</a> itself.
The answer is officially “No,” but like most things of this nature, there’s always
a sneaky way: 
</p>
        <!-- Stylesheet link -->
        <link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" />
        <!-- Code -->
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span>[type]:</span>
                <span class="symbol">:gettype</span>
                <span>(</span>
                <span class="string">"System.Management.Automation.KeywordTokenReader"</span>
                <span>)|%{</span>
                <span class="variable">$_</span>
                <span>.InvokeMember(</span>
                <span class="string">"_keywordTokens"</span>
                <span>, </span>
                <span class="string">"NonPublic,Static,GetField"</span>
                <span>, </span>
                <span class="variable">$null</span>
                <span>, </span>
                <span class="variable">$_</span>
                <span>,@())}   </span>
              </span>
            </li>
          </ol>
        </div>
        <p>
More interestingly this list turned up a new script keyword, <strong>dynamicparam. </strong>I
haven’t seen it in action yet but it sounds like another “advanced function” feature
to bring functions and cmdlets closer to parity. I may need to add another article
to my dynamic parameter series ;-)
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=15c3cda2-1805-461c-ac91-6076a61180f2" />
      </body>
      <title>PowerShell One Liner: Listing known language keywords in CTP3</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,15c3cda2-1805-461c-ac91-6076a61180f2.aspx</guid>
      <link>http://www.nivot.org/2008/12/27/PowerShellOneLinerListingKnownLanguageKeywordsInCTP3.aspx</link>
      <pubDate>Sat, 27 Dec 2008 05:21:38 GMT</pubDate>
      <description>&lt;p&gt;
Meson tweeted a request asking if it was possible to get a list of language keywords
from &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; itself.
The answer is officially “No,” but like most things of this nature, there’s always
a sneaky way: 
&lt;/p&gt;
&lt;!-- Stylesheet link --&gt;
&lt;link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css"&gt;
&lt;!-- Code --&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span&gt;[type]:&lt;/span&gt;&lt;span class="symbol"&gt;:gettype&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span class="string"&gt;"System.Management.Automation.KeywordTokenReader"&lt;/span&gt;&lt;span&gt;)|%{&lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.InvokeMember(&lt;/span&gt;&lt;span class="string"&gt;"_keywordTokens"&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span class="string"&gt;"NonPublic,Static,GetField"&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span class="variable"&gt;$null&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;,@())}&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
More interestingly this list turned up a new script keyword, &lt;strong&gt;dynamicparam. &lt;/strong&gt;I
haven’t seen it in action yet but it sounds like another “advanced function” feature
to bring functions and cmdlets closer to parity. I may need to add another article
to my dynamic parameter series ;-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=15c3cda2-1805-461c-ac91-6076a61180f2" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,15c3cda2-1805-461c-ac91-6076a61180f2.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=54e152f7-4a8d-456e-af87-65e8c6cf6cf2</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,54e152f7-4a8d-456e-af87-65e8c6cf6cf2.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,54e152f7-4a8d-456e-af87-65e8c6cf6cf2.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=54e152f7-4a8d-456e-af87-65e8c6cf6cf2</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is an interesting exercise to show the power of PowerShell’s language to explore
and manipulate object models, specifically its own. You all should be familiar with
Type Accelerators: The short name syntax for accessing commonly used .NET Types. An
example would be [wmi] – this is the same as typing [System.Management.ManagementObject].
So, how can we find all of the current existing Type Accelerators? Well, after cracking
open <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell</a> with
our favourite decompilation tool, <a target="_blank" href="http://www.red-gate.com/products/reflector/">Reflector</a>,
the class in question is System.Management.Automation.TypeAccelerators. Here’s what
it looks like:
</p>
        <!-- Stylesheet link -->
        <link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" />
        <!-- Code -->
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-c">
            <li class="alt">
              <span>
                <span class="keyword">internal</span>
                <span> </span>
                <span class="keyword">static</span>
                <span> </span>
                <span class="keyword">class</span>
                <span> TypeAccelerators   </span>
              </span>
            </li>
            <li>
              <span>{   </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="comment">// Fields </span>
              <span>  </span>
            </li>
            <li>
              <span>    </span>
              <span class="keyword">private</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> Dictionary&lt;</span>
              <span class="keyword">string</span>
              <span>,
Type&gt; allTypeAccelerators;   </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="keyword">internal</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> Dictionary&lt;</span>
              <span class="keyword">string</span>
              <span>,
Type&gt; builtinTypeAccelerators;   </span>
            </li>
            <li>
              <span>    </span>
              <span class="keyword">internal</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> Dictionary&lt;</span>
              <span class="keyword">string</span>
              <span>,
Type&gt; userTypeAccelerators;   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li>
              <span>    </span>
              <span class="comment">// Methods </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="keyword">static</span>
              <span> TypeAccelerators();   </span>
            </li>
            <li>
              <span>    </span>
              <span class="keyword">public</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> </span>
              <span class="keyword">void</span>
              <span> Add(</span>
              <span class="keyword">string</span>
              <span> typeName,
Type type);   </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="keyword">internal</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> </span>
              <span class="keyword">void</span>
              <span> FillCache(Dictionary&lt;</span>
              <span class="keyword">string</span>
              <span>,
Type&gt; cache);   </span>
            </li>
            <li>
              <span>    </span>
              <span class="keyword">internal</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> </span>
              <span class="keyword">string</span>
              <span> FindBuiltinAccelerator(Type
type);   </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="keyword">public</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> </span>
              <span class="keyword">bool</span>
              <span> Remove(</span>
              <span class="keyword">string</span>
              <span> typeName);   </span>
            </li>
            <li>
              <span>  </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="comment">// Properties </span>
              <span>  </span>
            </li>
            <li>
              <span>    </span>
              <span class="keyword">public</span>
              <span> </span>
              <span class="keyword">static</span>
              <span> Dictionary&lt;</span>
              <span class="keyword">string</span>
              <span>,
Type&gt; Get { </span>
              <span class="keyword">get</span>
              <span>; }   </span>
            </li>
            <li class="alt">
              <span>}   </span>
            </li>
            <li>
              <span>  </span>
            </li>
          </ol>
        </div>
        <p>
Interestingly, the methods that let you add and remove your own accelerators are marked
Public. The Type itself is internal, but the dictionary named “userTypeAccelerators”
is positively tantalizing. It looks like perhaps the team have plans to let people
add their own accelerators! Then again, this is a CTP, and this may change in the
future. Well, let’s see if we can finish off what the team half started ;-)
</p>
        <p>
First thing we need to do is get a reference to the internal class. The C# heads amongst
you will start thinking about using reflection to get your hands on the type, but
actually there’s an easier way. PowerShell’s language is incredibly flexible and through
sneakiness, you can use System.Type’s GetType method to invoke any public method without
reverting to tricky reflection calls. First of all, lets add our own user-defined
Type Accelerator which is aliased to this internal class itself:
</p>
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span class="comment"># get a reference to the Type  </span>
                <span>  </span>
              </span>
            </li>
            <li>
              <span>
              </span>
              <span class="variable">$acceleratorsType</span>
              <span> = [type]:</span>
              <span class="symbol">:gettype</span>
              <span>(</span>
              <span class="string">"System.Management.Automation.TypeAccelerators"</span>
              <span>)   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li>
              <span>
              </span>
              <span class="comment"># add an accelerator for this type ;-) </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="variable">$acceleratorsType</span>
              <span>::Add(</span>
              <span class="string">"accelerators"</span>
              <span>, </span>
              <span class="variable">$acceleratorsType</span>
              <span>)   </span>
            </li>
            <li>
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="comment"># will return all built-in accelerators (property) </span>
              <span>  </span>
            </li>
            <li>
              <span>[accelerators]:</span>
              <span class="symbol">:get</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li>
              <span>
              </span>
              <span class="comment"># add a user-defined accelerator </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>[accelerators]:</span>
              <span class="symbol">:add</span>
              <span>([string], [type])   </span>
            </li>
            <li>
              <span>  </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="comment"># remove a user-defined accelerator </span>
              <span>  </span>
            </li>
            <li>
              <span>[accelerators]:</span>
              <span class="symbol">:remove</span>
              <span>([string])   </span>
            </li>
          </ol>
        </div>
        <p>
I’ve split the Type retrieval and Add methods into two lines for brevity. The parser
is actually flexible enough to understand the more pithy ([type]::gettype("System.Management.Automation.TypeAccelerators"))::Add(…).
</p>
        <p>
So what do we have in CTP3? 
</p>
        <table border="1" width="200">
          <colgroup>
            <col />
            <col />
          </colgroup>
          <tbody>
            <tr>
              <th>
Name</th>
              <th>
Type</th>
            </tr>
            <tr>
              <td>
int</td>
              <td>
System.Int32</td>
            </tr>
            <tr>
              <td>
long</td>
              <td>
System.Int64</td>
            </tr>
            <tr>
              <td>
string</td>
              <td>
System.String</td>
            </tr>
            <tr>
              <td>
char</td>
              <td>
System.Char</td>
            </tr>
            <tr>
              <td>
bool</td>
              <td>
System.Boolean</td>
            </tr>
            <tr>
              <td>
byte</td>
              <td>
System.Byte</td>
            </tr>
            <tr>
              <td>
double</td>
              <td>
System.Double</td>
            </tr>
            <tr>
              <td>
decimal</td>
              <td>
System.Decimal</td>
            </tr>
            <tr>
              <td>
float</td>
              <td>
System.Single</td>
            </tr>
            <tr>
              <td>
single</td>
              <td>
System.Single</td>
            </tr>
            <tr>
              <td>
regex</td>
              <td>
System.Text.RegularExpressions.Regex</td>
            </tr>
            <tr>
              <td>
array</td>
              <td>
System.Array</td>
            </tr>
            <tr>
              <td>
xml</td>
              <td>
System.Xml.XmlDocument</td>
            </tr>
            <tr>
              <td>
scriptblock</td>
              <td>
System.Management.Automation.ScriptBlock</td>
            </tr>
            <tr>
              <td>
switch</td>
              <td>
System.Management.Automation.SwitchParameter</td>
            </tr>
            <tr>
              <td>
hashtable</td>
              <td>
System.Collections.Hashtable</td>
            </tr>
            <tr>
              <td>
type</td>
              <td>
System.Type</td>
            </tr>
            <tr>
              <td>
ref</td>
              <td>
System.Management.Automation.PSReference</td>
            </tr>
            <tr>
              <td>
psobject</td>
              <td>
System.Management.Automation.PSObject</td>
            </tr>
            <tr>
              <td>
pscustomobject</td>
              <td>
System.Management.Automation.PSObject</td>
            </tr>
            <tr>
              <td>
psmoduleinfo</td>
              <td>
System.Management.Automation.PSModuleInfo</td>
            </tr>
            <tr>
              <td>
powershell</td>
              <td>
System.Management.Automation.PowerShell</td>
            </tr>
            <tr>
              <td>
runspacefactory</td>
              <td>
System.Management.Automation.Runspaces.RunspaceFactory</td>
            </tr>
            <tr>
              <td>
runspace</td>
              <td>
System.Management.Automation.Runspaces.Runspace</td>
            </tr>
            <tr>
              <td>
ipaddress</td>
              <td>
System.Net.IPAddress</td>
            </tr>
            <tr>
              <td>
wmi</td>
              <td>
System.Management.ManagementObject</td>
            </tr>
            <tr>
              <td>
wmisearcher</td>
              <td>
System.Management.ManagementObjectSearcher</td>
            </tr>
            <tr>
              <td>
wmiclass</td>
              <td>
System.Management.ManagementClass</td>
            </tr>
            <tr>
              <td>
adsi</td>
              <td>
System.DirectoryServices.DirectoryEntry</td>
            </tr>
            <tr>
              <td>
adsisearcher</td>
              <td>
System.DirectoryServices.DirectorySearcher</td>
            </tr>
            <tr>
              <td>
accelerators</td>
              <td>
System.Management.Automation.TypeAccelerators</td>
            </tr>
          </tbody>
        </table>
        <p>
Btw, I generated the above list with this one liner:
</p>
        <div id="hlDiv" class="dp-highlighter">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span>[accelerators]::Get.getenumerator() | `   </span>
              </span>
            </li>
            <li>
              <span>    select @{Name=</span>
              <span class="string">"Name"</span>
              <span>;
expression={</span>
              <span class="variable">$_</span>
              <span>.key}},   </span>
            </li>
            <li class="alt">
              <span>           @{name=</span>
              <span class="string">"Type"</span>
              <span>;
expression={</span>
              <span class="variable">$_</span>
              <span>.value}} | `   </span>
            </li>
            <li>
              <span>    convertto-html -fragment &gt; .\accelerators.html   </span>
            </li>
          </ol>
        </div>
        <p>
Have fun!
</p>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=54e152f7-4a8d-456e-af87-65e8c6cf6cf2" />
      </body>
      <title>List of Type Accelerators for PowerShell CTP3</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,54e152f7-4a8d-456e-af87-65e8c6cf6cf2.aspx</guid>
      <link>http://www.nivot.org/2008/12/25/ListOfTypeAcceleratorsForPowerShellCTP3.aspx</link>
      <pubDate>Thu, 25 Dec 2008 20:29:55 GMT</pubDate>
      <description>&lt;p&gt;
This is an interesting exercise to show the power of PowerShell’s language to explore
and manipulate object models, specifically its own. You all should be familiar with
Type Accelerators: The short name syntax for accessing commonly used .NET Types. An
example would be [wmi] – this is the same as typing [System.Management.ManagementObject].
So, how can we find all of the current existing Type Accelerators? Well, after cracking
open &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;PowerShell&lt;/a&gt; with
our favourite decompilation tool, &lt;a target="_blank" href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt;,
the class in question is System.Management.Automation.TypeAccelerators. Here’s what
it looks like:
&lt;/p&gt;
&lt;!-- Stylesheet link --&gt;
&lt;link rel="stylesheet" type="text/css" href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css"&gt;
&lt;!-- Code --&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-c"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="keyword"&gt;internal&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt;&lt;span&gt; TypeAccelerators&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;{&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;// Fields &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;private&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt; Dictionary&amp;lt;&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt;,
Type&amp;gt; allTypeAccelerators;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;internal&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt; Dictionary&amp;lt;&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt;,
Type&amp;gt; builtinTypeAccelerators;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;internal&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt; Dictionary&amp;lt;&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt;,
Type&amp;gt; userTypeAccelerators;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;// Methods &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt; TypeAccelerators();&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;public&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;void&lt;/span&gt;&lt;span&gt; Add(&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt; typeName,
Type type);&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;internal&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;void&lt;/span&gt;&lt;span&gt; FillCache(Dictionary&amp;lt;&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt;,
Type&amp;gt; cache);&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;internal&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt; FindBuiltinAccelerator(Type
type);&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;public&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;bool&lt;/span&gt;&lt;span&gt; Remove(&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt; typeName);&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;// Properties &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;public&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="keyword"&gt;static&lt;/span&gt;&lt;span&gt; Dictionary&amp;lt;&lt;/span&gt;&lt;span class="keyword"&gt;string&lt;/span&gt;&lt;span&gt;,
Type&amp;gt; Get { &lt;/span&gt;&lt;span class="keyword"&gt;get&lt;/span&gt;&lt;span&gt;; }&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;}&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
Interestingly, the methods that let you add and remove your own accelerators are marked
Public. The Type itself is internal, but the dictionary named “userTypeAccelerators”
is positively tantalizing. It looks like perhaps the team have plans to let people
add their own accelerators! Then again, this is a CTP, and this may change in the
future. Well, let’s see if we can finish off what the team half started ;-)
&lt;/p&gt;
&lt;p&gt;
First thing we need to do is get a reference to the internal class. The C# heads amongst
you will start thinking about using reflection to get your hands on the type, but
actually there’s an easier way. PowerShell’s language is incredibly flexible and through
sneakiness, you can use System.Type’s GetType method to invoke any public method without
reverting to tricky reflection calls. First of all, lets add our own user-defined
Type Accelerator which is aliased to this internal class itself:
&lt;/p&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="comment"&gt;# get a reference to the Type&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$acceleratorsType&lt;/span&gt;&lt;span&gt; = [type]:&lt;/span&gt;&lt;span class="symbol"&gt;:gettype&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span class="string"&gt;"System.Management.Automation.TypeAccelerators"&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# add an accelerator for this type ;-) &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="variable"&gt;$acceleratorsType&lt;/span&gt;&lt;span&gt;::Add(&lt;/span&gt;&lt;span class="string"&gt;"accelerators"&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span class="variable"&gt;$acceleratorsType&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# will return all built-in accelerators (property) &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;[accelerators]:&lt;/span&gt;&lt;span class="symbol"&gt;:get&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# add a user-defined accelerator &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;[accelerators]:&lt;/span&gt;&lt;span class="symbol"&gt;:add&lt;/span&gt;&lt;span&gt;([string], [type])&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# remove a user-defined accelerator &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;[accelerators]:&lt;/span&gt;&lt;span class="symbol"&gt;:remove&lt;/span&gt;&lt;span&gt;([string])&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
I’ve split the Type retrieval and Add methods into two lines for brevity. The parser
is actually flexible enough to understand the more pithy ([type]::gettype("System.Management.Automation.TypeAccelerators"))::Add(…).
&lt;/p&gt;
&lt;p&gt;
So what do we have in CTP3? 
&lt;/p&gt;
&lt;table border="1" width="200"&gt;
&lt;colgroup&gt;
&lt;col&gt;
&lt;col&gt;
&lt;/colgroup&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;
Name&lt;/th&gt;
&lt;th&gt;
Type&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
int&lt;/td&gt;
&lt;td&gt;
System.Int32&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
long&lt;/td&gt;
&lt;td&gt;
System.Int64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
string&lt;/td&gt;
&lt;td&gt;
System.String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
char&lt;/td&gt;
&lt;td&gt;
System.Char&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
bool&lt;/td&gt;
&lt;td&gt;
System.Boolean&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
byte&lt;/td&gt;
&lt;td&gt;
System.Byte&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
double&lt;/td&gt;
&lt;td&gt;
System.Double&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
decimal&lt;/td&gt;
&lt;td&gt;
System.Decimal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
float&lt;/td&gt;
&lt;td&gt;
System.Single&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
single&lt;/td&gt;
&lt;td&gt;
System.Single&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
regex&lt;/td&gt;
&lt;td&gt;
System.Text.RegularExpressions.Regex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
array&lt;/td&gt;
&lt;td&gt;
System.Array&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
xml&lt;/td&gt;
&lt;td&gt;
System.Xml.XmlDocument&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
scriptblock&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.ScriptBlock&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
switch&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.SwitchParameter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
hashtable&lt;/td&gt;
&lt;td&gt;
System.Collections.Hashtable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
type&lt;/td&gt;
&lt;td&gt;
System.Type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
ref&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.PSReference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
psobject&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.PSObject&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
pscustomobject&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.PSObject&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
psmoduleinfo&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.PSModuleInfo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
powershell&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.PowerShell&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
runspacefactory&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.Runspaces.RunspaceFactory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
runspace&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.Runspaces.Runspace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
ipaddress&lt;/td&gt;
&lt;td&gt;
System.Net.IPAddress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
wmi&lt;/td&gt;
&lt;td&gt;
System.Management.ManagementObject&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
wmisearcher&lt;/td&gt;
&lt;td&gt;
System.Management.ManagementObjectSearcher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
wmiclass&lt;/td&gt;
&lt;td&gt;
System.Management.ManagementClass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
adsi&lt;/td&gt;
&lt;td&gt;
System.DirectoryServices.DirectoryEntry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
adsisearcher&lt;/td&gt;
&lt;td&gt;
System.DirectoryServices.DirectorySearcher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
accelerators&lt;/td&gt;
&lt;td&gt;
System.Management.Automation.TypeAccelerators&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Btw, I generated the above list with this one liner:
&lt;/p&gt;
&lt;div id="hlDiv" class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span&gt;[accelerators]::Get.getenumerator() | `&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select @{Name=&lt;/span&gt;&lt;span class="string"&gt;"Name"&lt;/span&gt;&lt;span&gt;;
expression={&lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.key}},&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @{name=&lt;/span&gt;&lt;span class="string"&gt;"Type"&lt;/span&gt;&lt;span&gt;;
expression={&lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.value}} | `&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; convertto-html -fragment &amp;gt; .\accelerators.html&amp;nbsp;&amp;nbsp; &lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=54e152f7-4a8d-456e-af87-65e8c6cf6cf2" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,54e152f7-4a8d-456e-af87-65e8c6cf6cf2.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=3e82586b-d5c3-4e0d-883a-74e22919247c</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,3e82586b-d5c3-4e0d-883a-74e22919247c.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,3e82586b-d5c3-4e0d-883a-74e22919247c.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=3e82586b-d5c3-4e0d-883a-74e22919247c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just to be completely silly, I thought I’d do a series of posts on CTP3 features themed
around Christmas. Hmm. That might read better as a series of Christmas posts themed
around CTP3. A very original idea I’m sure, but hey, those who know me will know that
I never pass up the opportunity to make a bad joke. So, without further adieu:
</p>
        <p>
On the first day of Christmas, <a href="http://twitter.com/jsnover" target="_blank">Jeffrey</a> gave
to me: 
</p>
        <h3>Nested Here-Strings
</h3>
        <p>
Here-Strings can now be embedded within each other to make it even easier to construct
literal documents! Delimit any nested code between $( and ) and then continue to use
a nested string within that as if it was completely stand alone. It just works! Cool,
eh?
</p>
        <!-- Stylesheet link -->
        <link href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" />
        <!-- Code -->
        <div class="dp-highlighter" id="hlDiv">
          <div class="bar">
          </div>
          <ol class="dp-rb">
            <li class="alt">
              <span>
                <span class="keyword">function</span>
                <span> Get-CommandDefinitionHtml {   </span>
              </span>
            </li>
            <li class="">
              <span>       </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="comment"># this tells powershell to allow
advanced features, </span>
              <span>  </span>
            </li>
            <li class="">
              <span>    </span>
              <span class="comment"># like the [validatenotnullorempty()]
attribute below. </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>    [CmdletBinding()]   </span>
            </li>
            <li class="">
              <span>    </span>
              <span class="keyword">param</span>
              <span>(   </span>
            </li>
            <li class="alt">
              <span>        [ValidateNotNullOrEmpty()]   </span>
            </li>
            <li class="">
              <span>        [string]</span>
              <span class="variable">$name</span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>    )   </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="variable">$command</span>
              <span> = get-command </span>
              <span class="variable">$name</span>
              <span>  </span>
            </li>
            <li class="">
              <span>       </span>
            </li>
            <li class="alt">
              <span>    </span>
              <span class="comment"># Look mom! I'm a cmdlet! </span>
              <span>  </span>
            </li>
            <li class="">
              <span>    </span>
              <span class="variable">$PSCmdlet</span>
              <span>.WriteVerbose(</span>
              <span class="string">"Dumping
HTML for "</span>
              <span> + </span>
              <span class="variable">$command</span>
              <span>)   </span>
            </li>
            <li class="alt">
              <span>       </span>
            </li>
            <li class="">
              <span>@</span>
              <span class="string">" </span>  
</li>
            <li class="alt">
              <span>
                <span class="string">    &lt;html&gt; </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">        &lt;head&gt; </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">           
&lt;title&gt;$($command.name)&lt;/title&gt; </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">        &lt;/head&gt; </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">        &lt;body&gt; </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">           
&lt;table border="</span>
                <span>1</span>
                <span class="string">"&gt; </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">$( </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">    $command.parametersets | % { </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">@"</span>
                <span>  </span>
              </span>
            </li>
            <li class="">
              <span>  </span>
            </li>
            <li class="alt">
              <span>            &lt;tr&gt;   </span>
            </li>
            <li class="">
              <span>               
&lt;td&gt;$(</span>
              <span class="variable">$_</span>
              <span>.name)&lt;/td&gt;   </span>
            </li>
            <li class="alt">
              <span>               
&lt;td&gt;   </span>
            </li>
            <li class="">
              <span>                   
&lt;table border=</span>
              <span class="string">"1"</span>
              <span>&gt;   </span>
            </li>
            <li class="alt">
              <span>                       
&lt;tr&gt;   </span>
            </li>
            <li class="">
              <span>                           
&lt;th colspan=</span>
              <span class="string">"8"</span>
              <span>&gt;Parameters&lt;/th&gt;   </span>
            </li>
            <li class="alt">
              <span>                               </span>
            </li>
            <li class="">
              <span>$(   </span>
            </li>
            <li class="alt">
              <span>        </span>
              <span class="variable">$count</span>
              <span> =
0   </span>
            </li>
            <li class="">
              <span>        </span>
              <span class="variable">$_</span>
              <span>.parameters
| % {   </span>
            </li>
            <li class="alt">
              <span>            </span>
              <span class="keyword">if</span>
              <span> (0
-eq (</span>
              <span class="variable">$count</span>
              <span> % 8)) {   </span>
            </li>
            <li class="">
              <span>@</span>
              <span class="string">" </span>  
</li>
            <li class="alt">
              <span>
                <span class="string">                       
&lt;/tr&gt; </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">                       
&lt;tr&gt; </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">"</span>
                <span>@   </span>
              </span>
            </li>
            <li class="">
              <span>            }                   </span>
            </li>
            <li class="alt">
              <span>@</span>
              <span class="string">" </span>  
</li>
            <li class="">
              <span>
                <span class="string">                           
&lt;td&gt;$($_.name)&lt;/td&gt; </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">"</span>
                <span>@               </span>
              </span>
            </li>
            <li class="">
              <span>            </span>
              <span class="variable">$count</span>
              <span>++   </span>
            </li>
            <li class="alt">
              <span>    }   </span>
            </li>
            <li class="">
              <span>)   </span>
            </li>
            <li class="alt">
              <span>                       
&lt;/tr&gt;                           </span>
            </li>
            <li class="">
              <span>                   
&lt;/table&gt;   </span>
            </li>
            <li class="alt">
              <span>               
&lt;/td&gt;   </span>
            </li>
            <li class="">
              <span>            &lt;/tr&gt;   </span>
            </li>
            <li class="alt">
              <span>
              </span>
              <span class="string">"@ </span>  
</li>
            <li class="">
              <span>
                <span class="string">    } </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">) </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">           
&lt;/table&gt;         </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">        &lt;/body&gt; </span> </span>
            </li>
            <li class="">
              <span>
                <span class="string">    &lt;/html&gt; </span> </span>
            </li>
            <li class="alt">
              <span>
                <span class="string">"</span>
                <span>@       </span>
              </span>
            </li>
            <li class="">
              <span>}   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>Get-CommandDefinitionHtml get-item &gt; out.html   </span>
            </li>
            <li class="alt">
              <span>  </span>
            </li>
            <li class="">
              <span>
              </span>
              <span class="comment"># show in browser </span>
              <span>  </span>
            </li>
            <li class="alt">
              <span>invoke-item out.html  </span>
            </li>
          </ol>
        </div>
        <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=3e82586b-d5c3-4e0d-883a-74e22919247c" />
      </body>
      <title>The Twelve days of PowerShell 2.0 CTP3!</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,3e82586b-d5c3-4e0d-883a-74e22919247c.aspx</guid>
      <link>http://www.nivot.org/2008/12/23/TheTwelveDaysOfPowerShell20CTP3.aspx</link>
      <pubDate>Tue, 23 Dec 2008 21:16:03 GMT</pubDate>
      <description>&lt;p&gt;
Just to be completely silly, I thought I’d do a series of posts on CTP3 features themed
around Christmas. Hmm. That might read better as a series of Christmas posts themed
around CTP3. A very original idea I’m sure, but hey, those who know me will know that
I never pass up the opportunity to make a bad joke. So, without further adieu:
&lt;/p&gt;
&lt;p&gt;
On the first day of Christmas, &lt;a href="http://twitter.com/jsnover" target="_blank"&gt;Jeffrey&lt;/a&gt; gave
to me: 
&lt;/p&gt;
&lt;h3&gt;Nested Here-Strings
&lt;/h3&gt;
&lt;p&gt;
Here-Strings can now be embedded within each other to make it even easier to construct
literal documents! Delimit any nested code between $( and ) and then continue to use
a nested string within that as if it was completely stand alone. It just works! Cool,
eh?
&lt;/p&gt;
&lt;!-- Stylesheet link --&gt;
&lt;link href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet"&gt;
&lt;!-- Code --&gt;
&lt;div class="dp-highlighter" id="hlDiv"&gt;
&lt;div class="bar"&gt;
&lt;/div&gt;
&lt;ol class="dp-rb"&gt;
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="keyword"&gt;function&lt;/span&gt;&lt;span&gt; Get-CommandDefinitionHtml {&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# this tells powershell to allow
advanced features, &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# like the [validatenotnullorempty()]
attribute below. &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CmdletBinding()]&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="keyword"&gt;param&lt;/span&gt;&lt;span&gt;(&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ValidateNotNullOrEmpty()]&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [string]&lt;/span&gt;&lt;span class="variable"&gt;$name&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$command&lt;/span&gt;&lt;span&gt; = get-command &lt;/span&gt;&lt;span class="variable"&gt;$name&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="comment"&gt;# Look mom! I'm a cmdlet! &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$PSCmdlet&lt;/span&gt;&lt;span&gt;.WriteVerbose(&lt;/span&gt;&lt;span class="string"&gt;"Dumping
HTML for "&lt;/span&gt;&lt;span&gt; + &lt;/span&gt;&lt;span class="variable"&gt;$command&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;@&lt;/span&gt;&lt;span class="string"&gt;" &lt;/span&gt;&amp;nbsp;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;html&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;title&amp;gt;$($command.name)&amp;lt;/title&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;table border="&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span class="string"&gt;"&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;$( &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $command.parametersets | % { &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;@"&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&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;lt;td&amp;gt;$(&lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.name)&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&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;lt;td&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&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;lt;table border=&lt;/span&gt;&lt;span class="string"&gt;"1"&lt;/span&gt;&lt;span&gt;&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&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;lt;tr&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&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;lt;th colspan=&lt;/span&gt;&lt;span class="string"&gt;"8"&lt;/span&gt;&lt;span&gt;&amp;gt;Parameters&amp;lt;/th&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&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;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;$(&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$count&lt;/span&gt;&lt;span&gt; =
0&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="variable"&gt;$_&lt;/span&gt;&lt;span&gt;.parameters
| % {&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&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 class="keyword"&gt;if&lt;/span&gt;&lt;span&gt; (0
-eq (&lt;/span&gt;&lt;span class="variable"&gt;$count&lt;/span&gt;&lt;span&gt; % 8)) {&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class=""&gt;
&lt;span&gt;@&lt;/span&gt;&lt;span class="string"&gt;" &lt;/span&gt;&amp;nbsp;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&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;lt;/tr&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&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;lt;tr&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;"&lt;/span&gt;&lt;span&gt;@&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&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; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;@&lt;/span&gt;&lt;span class="string"&gt;" &lt;/span&gt;&amp;nbsp;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&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;lt;td&amp;gt;$($_.name)&amp;lt;/td&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;"&lt;/span&gt;&lt;span&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; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&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 class="variable"&gt;$count&lt;/span&gt;&lt;span&gt;++&amp;nbsp;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&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;lt;/tr&amp;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&gt; 
&lt;li class=""&gt;
&lt;span&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;lt;/table&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&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;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="string"&gt;"@ &lt;/span&gt;&amp;nbsp;&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;) &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;/table&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;span class="string"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/html&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&lt;span class="string"&gt;"&lt;/span&gt;&lt;span&gt;@&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;}&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;Get-CommandDefinitionHtml get-item &amp;gt; out.html&amp;nbsp;&amp;nbsp; &lt;/span&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;&amp;nbsp; &lt;/span&gt; 
&lt;li class=""&gt;
&lt;span&gt;&lt;/span&gt;&lt;span class="comment"&gt;# show in browser &lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&gt; 
&lt;li class="alt"&gt;
&lt;span&gt;invoke-item out.html&amp;nbsp; &lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=3e82586b-d5c3-4e0d-883a-74e22919247c" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,3e82586b-d5c3-4e0d-883a-74e22919247c.aspx</comments>
      <category>.NET</category>
      <category>Cmdlets</category>
      <category>CTP3</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.nivot.org/Trackback.aspx?guid=aecfef34-9b4a-460d-84fa-ab5259f14e1d</trackback:ping>
      <pingback:server>http://www.nivot.org/pingback.aspx</pingback:server>
      <pingback:target>http://www.nivot.org/PermaLink,guid,aecfef34-9b4a-460d-84fa-ab5259f14e1d.aspx</pingback:target>
      <dc:creator>Oisin Grehan</dc:creator>
      <wfw:comment>http://www.nivot.org/CommentView,guid,aecfef34-9b4a-460d-84fa-ab5259f14e1d.aspx</wfw:comment>
      <wfw:commentRss>http://www.nivot.org/SyndicationService.asmx/GetEntryCommentsRss?guid=aecfef34-9b4a-460d-84fa-ab5259f14e1d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
To quote the completely understated download blurb:
</p>
        <blockquote>
          <p>
            <em>Windows PowerShell V2 CTP3 introduces several significant features to Windows
PowerShell 1.0 and Windows PowerShell V2 CTPs that extends its use, improves its usability,
and allows you to control and manage the Windows environment more easily and comprehensively.</em>
          </p>
        </blockquote>
        <p>
The release notes are quite extensive. Here is the section on breaking changes from
CTP2: 
</p>
        <p>
          <b>Breaking Changes to Windows PowerShell V2 (CTP2)</b>
        </p>
        <p>
          <b>
          </b>
        </p>
        <p align="left">
The following changes in Windows PowerShell V2.0 CTP3 might prevent features designed
for Windows PowerShell 2.0 CTP2 from working correctly. 
</p>
        <p align="left">
          <a name="_Setup_with_scripts">
          </a>
        </p>
        <ul>
          <li>
            <div align="left">Following cmdlets have been renamed<b></b></div>
            <ul>
              <li>
                <div align="left">Add-Module to Import-Module<b></b></div>
              </li>
              <li>
                <div align="left">Get-Event to Get-WinEvent<b></b></div>
              </li>
              <li>
                <div align="left">*-Runspace to *-PSSession<b></b></div>
              </li>
              <li>
                <div align="left">Push-Runspace to Enter-PSSession<b></b></div>
              </li>
              <li>
                <div align="left">Pop-Runspace to Exit-PSSession<b></b></div>
              </li>
              <li>
                <div align="left">*-PSEvent to *-Event<b></b></div>
              </li>
              <li>
                <div align="left">Register-PSEvent to Register-EngineEvent<b></b></div>
              </li>
              <li>
                <div align="left">*-PSTransaction to *-Transaction<b></b></div>
              </li>
              <li>
                <div align="left">*-PSJob to *-Job<b></b></div>
              </li>
              <li>
                <div align="left">*-PSEventSubscriber to *-EventSubscriber<b></b></div>
              </li>
              <li>
                <div align="left">*-Bite to *-FileTransfer<b></b></div>
              </li>
            </ul>
          </li>
        </ul>
        <p align="left">
          <b>
          </b>
        </p>
        <ul>
          <li>
            <div align="left">Following parameters have been renamed
</div>
            <ul>
              <li>
                <div align="left">Import-LocalizedData: Culture to UICulture
</div>
              </li>
              <li>
                <div align="left">Invoke-Command: Runspace to Session, Shell to ConfigurationName
</div>
              </li>
              <li>
                <div align="left">Get-Job: SessionId to Id 
</div>
              </li>
              <li>
                <div align="left">Receive-Job: Runspace to Session, SessionId to Id
</div>
              </li>
              <li>
                <div align="left">Remove-Job: SessionId to Id
</div>
              </li>
              <li>
                <div align="left">Start-Job: Command to Scriptblock
</div>
              </li>
              <li>
                <div align="left">Stop-Job: SessionId to Id
</div>
              </li>
              <li>
                <div align="left">Wait-Job: SessionId to Id
</div>
              </li>
              <li>
                <div align="left">Get-PSSession: RemoteRunspaceID to InstanceId, SessionId to Id
</div>
              </li>
              <li>
                <div align="left">New-PSSession: Runspace to Session, Shell to ConfigurationName
</div>
              </li>
              <li>
                <div align="left">Enter-PSSession: Runspace to Session, RemoteRunspaceID to InstanceId,
SessionId to Id, Shell to ConfigurationName
</div>
              </li>
              <li>
                <div align="left">Remove-PSSession: Runspace to Session, RemoteRunspaceID to InstanceId,
SessionId to Id
</div>
              </li>
            </ul>
          </li>
        </ul>
        <p align="left">
          <b>
          </b>
        </p>
        <ul>
          <li>
            <div align="left">Following parameters have been deleted
</div>
            <ul>
              <li>
                <div align="left">Export-ModuleMember: Update, ExportList
</div>
              </li>
              <li>
                <div align="left">Set-Service: Include, Exclude
</div>
              </li>
            </ul>
          </li>
        </ul>
        <p align="left">
          <b>
          </b>
        </p>
        <ul>
          <li>
            <div align="left">Following variables have been renamed<b></b></div>
            <ul>
              <li>
                <div align="left">$CommandLineParameters to $PSBoundParameters<b></b></div>
              </li>
              <li>
                <div align="left">$PSPackagePath to $PSModulePath<b></b></div>
              </li>
            </ul>
          </li>
        </ul>
        <p align="left">
          <b>
          </b>
        </p>
        <ul>
          <li>
            <div align="left">Packages have been renamed to Modules. Packages folder is now renamed
to Modules folder. A module imported into another module is now treated as a nested
module instead of a peer module. This allows a new module to wrap or repackage one
or more existing modules.
</div>
          </li>
        </ul>
        <p align="left">
          <b>
          </b>
        </p>
        <ul>
          <li>
            <div align="left">"Script cmdlets" have been renamed to "advanced functions." The
“cmdlet” keyword has been replaced with the “function” keyword.<b></b>For script
cmdlet functionality, use CmdletBinding attribute in the function’s param block. For
more information, see about_functions_advanced.
</div>
          </li>
        </ul>
        <ul>
          <li>
            <div align="left">The Config-WSMan.ps1 script in the $pshome directory has been replaced
by the Enable-PSRemoting function. To configure your system for WS-Management remoting,
use the following command<b>:</b></div>
          </li>
        </ul>
        <p align="left">
          <b>Enable-PSRemoting –force</b>
        </p>
        <p align="left">
          <b>
          </b>
        </p>
        <p align="left">
          <i>Note: If you have upgraded from the Windows PowerShell V2 CTP2 release to the Windows
PowerShell V2 CTP3 release, to configure your system for WS-Management remoting, type:</i>
        </p>
        <p align="left">
          <b>Unregister-PSSessionConfiguration * -force;</b>
        </p>
        <p align="left">
          <b>Register-PSSessionConfiguration Microsoft.PowerShell –force;</b>
        </p>
        <p align="left">
          <b>Enable-PSRemoting –force</b>
        </p>
        <ul>
          <li>
            <div align="left">In the Out-GridView cmdlet, the drop-down list used to filter objects
is now called “Query” instead of “Filter”.<b></b></div>
          </li>
        </ul>
        <p align="left">
          <b>
          </b>
        </p>
        <ul>
          <li>
            <div align="left">The following changes have been made to Windows PowerShell Integrated
Scripting Environment (ISE):
</div>
          </li>
        </ul>
        <ul>
          <ul>
            <li>
              <div align="left">The name of the application has changed from “Graphical Windows
PowerShell” to “Windows PowerShell Integrated Scripting Environment (ISE)”
</div>
            </li>
            <li>
              <div align="left">The executable name has changed from “gpowershell.exe” to “powershell_ise.exe”
</div>
            </li>
            <li>
              <div align="left">The profile name has changed from “\Users\&lt;username&gt;\Documents\WindowsPowerShell\Microsoft.GPowerShell_profile.ps1”
to “\Users\&lt;username&gt;\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1”
</div>
            </li>
            <li>
              <div align="left">The term “runspace” has been replaced with “PowerShell tab”.
</div>
            </li>
          </ul>
        </ul>
        <p>
Get it from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc" target="_blank">http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc</a> –
piping hot! <img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=aecfef34-9b4a-460d-84fa-ab5259f14e1d" /></p>
      </body>
      <title>PowerShell 2.0 CTP3 has arrived!</title>
      <guid isPermaLink="false">http://www.nivot.org/PermaLink,guid,aecfef34-9b4a-460d-84fa-ab5259f14e1d.aspx</guid>
      <link>http://www.nivot.org/2008/12/23/PowerShell20CTP3HasArrived.aspx</link>
      <pubDate>Tue, 23 Dec 2008 02:59:52 GMT</pubDate>
      <description>&lt;p&gt;
To quote the completely understated download blurb:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;Windows PowerShell V2 CTP3 introduces several significant features to Windows
PowerShell 1.0 and Windows PowerShell V2 CTPs that extends its use, improves its usability,
and allows you to control and manage the Windows environment more easily and comprehensively.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
The release notes are quite extensive. Here is the section on breaking changes from
CTP2: 
&lt;p&gt;
&lt;b&gt;Breaking Changes to Windows PowerShell V2 (CTP2)&lt;/b&gt; 
&lt;p&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;p align="left"&gt;
The following changes in Windows PowerShell V2.0 CTP3 might prevent features designed
for Windows PowerShell 2.0 CTP2 from working correctly. 
&lt;p align="left"&gt;
&lt;a name="_Setup_with_scripts"&gt;&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Following cmdlets have been renamed&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Add-Module to Import-Module&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Get-Event to Get-WinEvent&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;*-Runspace to *-PSSession&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Push-Runspace to Enter-PSSession&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Pop-Runspace to Exit-PSSession&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;*-PSEvent to *-Event&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Register-PSEvent to Register-EngineEvent&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;*-PSTransaction to *-Transaction&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;*-PSJob to *-Job&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;*-PSEventSubscriber to *-EventSubscriber&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;*-Bite to *-FileTransfer&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Following parameters have been renamed
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Import-LocalizedData: Culture to UICulture
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Invoke-Command: Runspace to Session, Shell to ConfigurationName
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Get-Job: SessionId to Id 
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Receive-Job: Runspace to Session, SessionId to Id
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Remove-Job: SessionId to Id
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Start-Job: Command to Scriptblock
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Stop-Job: SessionId to Id
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Wait-Job: SessionId to Id
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Get-PSSession: RemoteRunspaceID to InstanceId, SessionId to Id
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;New-PSSession: Runspace to Session, Shell to ConfigurationName
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Enter-PSSession: Runspace to Session, RemoteRunspaceID to InstanceId,
SessionId to Id, Shell to ConfigurationName
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Remove-PSSession: Runspace to Session, RemoteRunspaceID to InstanceId,
SessionId to Id
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Following parameters have been deleted
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Export-ModuleMember: Update, ExportList
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;Set-Service: Include, Exclude
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Following variables have been renamed&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;$CommandLineParameters to $PSBoundParameters&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;$PSPackagePath to $PSModulePath&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;Packages have been renamed to Modules. Packages folder is now renamed
to Modules folder. A module imported into another module is now treated as a nested
module instead of a peer module. This allows a new module to wrap or repackage one
or more existing modules.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;"Script cmdlets" have been renamed to "advanced functions." The
“cmdlet” keyword has been replaced with the “function” keyword.&lt;b&gt; &lt;/b&gt;For script
cmdlet functionality, use CmdletBinding attribute in the function’s param block. For
more information, see about_functions_advanced.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;The Config-WSMan.ps1 script in the $pshome directory has been replaced
by the Enable-PSRemoting function. To configure your system for WS-Management remoting,
use the following command&lt;b&gt;:&lt;/b&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;Enable-PSRemoting –force&lt;/b&gt; 
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;p align="left"&gt;
&lt;i&gt;Note: If you have upgraded from the Windows PowerShell V2 CTP2 release to the Windows
PowerShell V2 CTP3 release, to configure your system for WS-Management remoting, type:&lt;/i&gt; 
&lt;p align="left"&gt;
&lt;b&gt;Unregister-PSSessionConfiguration * -force;&lt;/b&gt; 
&lt;p align="left"&gt;
&lt;b&gt;Register-PSSessionConfiguration Microsoft.PowerShell –force;&lt;/b&gt; 
&lt;p align="left"&gt;
&lt;b&gt;Enable-PSRemoting –force&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;In the Out-GridView cmdlet, the drop-down list used to filter objects
is now called “Query” instead of “Filter”.&lt;b&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align="left"&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;The following changes have been made to Windows PowerShell Integrated
Scripting Environment (ISE):
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align="left"&gt;The name of the application has changed from “Graphical Windows
PowerShell” to “Windows PowerShell Integrated Scripting Environment (ISE)”
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;The executable name has changed from “gpowershell.exe” to “powershell_ise.exe”
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;The profile name has changed from “\Users\&amp;lt;username&amp;gt;\Documents\WindowsPowerShell\Microsoft.GPowerShell_profile.ps1”
to “\Users\&amp;lt;username&amp;gt;\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1”
&lt;/div&gt;
&lt;li&gt;
&lt;div align="left"&gt;The term “runspace” has been replaced with “PowerShell tab”.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;
Get it from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc" target="_blank"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&lt;/a&gt; –
piping hot! &lt;img width="0" height="0" src="http://www.nivot.org/aggbug.ashx?id=aecfef34-9b4a-460d-84fa-ab5259f14e1d" /&gt;</description>
      <comments>http://www.nivot.org/CommentView,guid,aecfef34-9b4a-460d-84fa-ab5259f14e1d.aspx</comments>
      <category>.NET</category>
      <category>CTP3</category>
      <category>Monad</category>
      <category>PowerShell</category>
      <category>PowerShell 2.0</category>
    </item>
  </channel>
</rss>