I wanted to find the new cmdlets / functions in Powershell. I used the following approach, but not sure if it is comprehensive / correct. Any ideas to find this in a better / different way?
Run the below once from v2 and once from v3 ( and write to a different file)
get-command -Module Microsoft.PowerShell.* |
select -expand name | out-file e:\poshv2.txt
Then use Compare-Object to see what's added ( or removed)
Compare-Object (gc e:\poshv2.txt) (gc e:\poshv3.txt)
My observation based on this is that there were 25 new cmdlets added ( and none were removed)
One question that was raised as a comment on my blog was that Disable-PsRemoting
, which appeared in this list, is not really new. The reason it appeared was that it was not in the modu开发者_JS百科les under Microsoft.Powershell.*
( and it was not a cmdlet), but it is in v3.0.
The only difference which you already noted is that in v2 Disable-PsRemoting was a function and in v3 it's a cmdlet. I wrote about cmdlet and parameter changes in v3 (using a similar compare method) on the PowerShell Magazine website.
http://www.powershellmagazine.com/2011/09/15/how-to-find-out-whats-new-in-powershell-vnext/
精彩评论