At work, where I do most of my PowerShell, we’ve only just shifted off XP, so in anticipation of recently I’d not really looked much into the differences between PowerShell 1 and 2. The ISE is pretty excellent (its a debugger!), support for webservices is a few years too late (but very welcome) and I can see Remote PowerShell being pretty useful.
So I’d not really been keeping up. If anything I was deliberately ignoring it, to avoid the temptation to write something that would require upgrading the server. But eventually, I cracked[1].
Oh My God.
Place aside for the moment the absolute avalanche[2] of new cmdlets (write-verbose, out-gridview, select-xml[3], measure-object etc…), and place aside for the moment support for background jobs, the wonderful -split and -join operators, and even place aside how tab-completion now works for .net static methods…
Tab completion now works for speech functions and their parameters. You can type in a function on one line, and be happily tab-carrying out it on the next. You can even add comment-based or XML help, even if probably not at the console.
Once again, PowerShell rocks
[1] Blame PowerDbg
[2] Some guy[4] is writing a blog series on every new cmdlet!
[3] Select-Xml: Here’s one I used now at work to get all the references from all the C# machinate files within a folder hierarchy. Sure you may possibly do it all before with XmlDocument, but check this out:
PS > dir . -filter:*.csproj -Recurse | `
Select-Xml -XPath:’//*[local-name() = "Reference"]‘ | `
Select-Object -ExpandProperty NodeInclude
——-
System
System.Core
System.Xml.Linq
System.Data.DataSetExtensions
System.Data
System.Xml
[4] He’s called Jonathan Medd, but the ‘some guy’ thing has a certain ring to it…
[5] Oh, and proper try{}catch{}finally{} error handling. I missed that
Check it out:Cup(Of T)










![Trend Micro Titanium AntiVirus Plus 2011 - 1 User [Download] Reviews](http://ecx.images-amazon.com/images/I/51zwIZGTNDL._SL160_.jpg)
Answers Rating