header image

PowerShell v1 to v2 changes

Posted by: | February 20, 2009 | No Comment |

Jeffrey left a comment on this post http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2084.entry regarding discovery of WMI classes.  He pointed out that if the line of PowerShell is changed to

Get-WMIObject -NameSpace root -Recurse -List *Printer*


that you can check all namespaces in one hit.  Recurse! where did that come from. 

Checked the help file for Get-WmiObject and couldn’t see anything about recurse – but it is mentioned in the release notes. Must read the release notes more carefully.

There are a ton of changes between v1 and v2 and it can be difficult to keep track of them all.  One thing I do is download the v1 graphical help from http://www.microsoft.com/technet/scriptcenter/topics/winpsh/pschm.mspx and keep it on the desk top.  It is always handy to refer back to the v1 help to check for changes and I can compare the help for v1 and v2 easily.  Note that the v2 help isn’t always complete – functionality has to be produced before it can be documented.

The other good source of information is http://www.nivot.org/2009/02/04/DifferencesBetweenPowerShell10RTMAndPowershell20CTP3Win7Beta.aspx and http://www.nivot.org/2008/12/23/PowerShell20CTP3HasArrived.aspx

PowerShell is getting bigger and better every time we turn around. Hopefully these resources will help to keep track of the changes.


Technorati Tags: PowerShell,Help,Changes

under: PowerShellV2