PowerShell CTPs are great. When I started to use PowerShell on a daily basis it was already v2 CTP2. And that is the main reason why I know very little about v1 It was just so much better experience… Same happens now with v3 CTP1. Once I saw it’s coming – I started to look for a way to get all requirements on my primary machine. I haven’t really played with stuff that is new in version 3 – like workflows. What I concentrate on is stuff that got improved from version 2. And from my perspective there are few I simply could not ignore.
ISE
I’m using ISE all the time. It’s my console window, my script editor – you name it. I have tried several products – both commercial and free – but I always come back to ISE. And ISE in version 3 is much, much better. What I like the most is Intellisense and feature I asked for on this blog – support for XML (and ps1xml of course) syntax. It’s not perfect (yet?), but it’s step in the right direction. I also love new snippets feature. I love the fact, that errors are shown during editing file, which simplifies debugging. Code folding that is just brilliant way to find part of the script/ module quickly. And more…
Building objects
I mentioned it several times, and I will mention it once more: I’m big fan of hashtables, and whenever I can I try to use them. In v3 we will get very powerful syntax to create objects, both custom and real .NET types:
[PSCustomObject]@{ Name = 'My Object' Version = [version]'1.2.3.4' CreatedOn = Get-Date iLove = 'PowerShell' CreatedBy = whoami }
It has big advantage over New-Object –Property – order of members is preserved, so my main issue with custom objects is gone. You can also keep order in normal hashtables, all you need to do is add [ordered] in front of hashtable construct.
Commands when you need them
I used to load several modules in my profile. That is no longer the case – most of commands I use are unique across modules and with the way CommandNotFound exception works (plus the way [TAB] behaves) I don’t have to memorize where I kept any of commands. They just work. Really, I was amazed how fluent it can be. There are of course some modules that have to be loaded in order to make any sense (like SparkPlug or ISEFun that extend ISE functionality) but if module is pure toolbox, with some commands I use from time to time – I just use them and PowerShell does the magic for me in the background.
… and more
I mean really – I’ve just scratched the surface. There are whole blog series about new stuff in v3 CTP1. I’ve just mentioned few I value most. Stuff like workflows, PowerShell Web Access and other new features are just mind blowing. Future looks very promising. And I can’t wait when I will have chance to speak about it with other PowerShell enthusiasts during PowerShell Deep Dive next week. Woo – hoo!