Prof. Powershell
PowerShell 2.0: Even Better Than 1.0
The community technology preview is worth the time to download. Here's what I like so far.
- By Jeffery Hicks
- 02/09/2009
If you've been following Powershell for any length of time, then you probably have heard that Microsoft is working on PowerShell 2.0. While no release dates have been set, we can likely expect to see it around the releases of Windows 7 and Windows Server 2008 R2. Should you care? Absolutely.
While PowerShell 1.0 is the only supported version you should run in a production environment, and the version I am focusing on with this column, you owe it yourself to keep an eye on PowerShell 2.0. As of this writing, you can download the third version of the PowerShell Community Technology Preview, otherwise known as CTP3, from Microsoft's download page.
You will need to install it on a Windows Vista or Windows Server 2008 platform to get the most out of it. CTP3 cannot exist side by side with PowerShell 1.0, so install it on a test system. I use a variety of virtual machines for my test environment. Once installed, be sure to take a look at the release notes. The CTP isn't even a beta, so many things can -- and probably will -- change between now and the final release, but you can begin exploring these features:
Windows PowerShell ISE
Formerly referred to as Graphical PowerShell, this is a GUI-based PowerShell console complete with a rudimentary PowerShell script editor. You can create a PowerShell script file, run it and see the results all in one window. Need another PowerShell window? Simply create a new tab.
Background Jobs
PowerShell 2.0 introduces the Job object. The main reason you should care is that first, you'll be able to execute long-running scripts as background jobs, returning control to the shell immediately. The Unix world has had this feature for a long time and you will love it. Related to this is the next feature.
Remote Execution
You will be able to remotely run commands and scripts on one or more remote computers and return the results to your PowerShell session. Need to get disk utilization on 20 servers? No problem. Execute a script remotely on all 20 machines at once and collect the results when you are ready.
These are just a few highlights. There are many new cmdlets and enhancements to some old favorites. To get a taste of the future, get PowerShell CTP3 and put it through its paces. I bet you'll like what you see.
About the Author
Jeffery Hicks is an IT veteran with over 25 years of experience, much of it spent as an IT infrastructure consultant specializing in Microsoft server technologies with an emphasis in automation and efficiency. He is a multi-year recipient of the Microsoft MVP Award in Windows PowerShell. He works today as an independent author, trainer and consultant. Jeff has written for numerous online sites and print publications, is a contributing editor at Petri.com, and a frequent speaker at technology conferences and user groups.