Shell power for Windows
Posted on 29 Jun 2006 at 11:22
Thomas Lee looks at microsoft's cool new administration shell and scripting tool, powershell, and finds out how it fits into the .NET framework
Over the past few years, Microsoft has been quietly building a next-generation administrative shell product codenamed Monad. Now launched with the more formal name PowerShell, this product is in late beta, and a release candidate was delivered at the MMC Summit in April. PowerShell will ship as part of both Exchange 2007 and MOM 3 (now renamed System Center Operations Manager 2007), and in the WinFX SDK towards the end of this year. You can get PowerShell RC1 for 32- and 64-bit CPUs from the Microsoft website, which requires a mandatory registration using Passport. Pick up the documentation pack too. To run PowerShell, you first need to install .NET Framework 2, which you can also download (I've put links to all the needed bits on www.reskit.net and I'll keep these up to date as the launch approaches).
I have to wonder at the folks who name Microsoft's products: "PowerShell" sounds like a throwback to some freeware add-on for Windows 3.11, while Googling reveals that it's already being used for two other existing products. For reasons understood only in Redmond, PowerShell won't be shipping in Vista, even though it would run just fine.
However, despite Microsoft's Department of Mindless Marketing Names doing its worst, PowerShell is a fantastic product that most IT professionals are going to love - you'll be reading a lot more about it over the coming months (and years). It's a very cool product in several ways that I could spend days discussing - and no doubt will be doing in due course - but I'll leave a general survey of its features to other PC Pro writers and other forums. The relevance of PowerShell to this particular column is that it's built on top of - and fully exposes - the .NET Framework for use from a command line.
Why a new command shell?
PowerShell is a new administration shell and scripting tool, aimed at administrators who manage computer systems. It provides a highly interactive command shell, on a par with the C-shell or Bourne shell under Linux/Unix. It also supports a rich programming language with features that rival Perl or Ruby, with a focus on administration and job control.
At the heart of PowerShell is the interactive command shell, which looks superficially much like cmd.exe, as you can see in the screenshot on the right. At the shell prompt, you can run either interactive commands or prewritten scripts, similar to the way you ran BAT or CMD files under cmd.exe.
The history of Microsoft's administrative management tools is patchy and inconsistent, beginning with cmd.exe on NT combined with a few GUI-based tools from Microsoft and others. Then we got VBScript and WMI, and finally along with Windows 2000 came the Microsoft Management Console (MMC). None of these tools were properly aimed at administrators, nor were they particularly powerful (even VBScript has its limits). Unix/Linux admins by contrast have always had a wealth of powerful tools to assist them.
Unix's pipe construct has always been at the heart of its management tools, and PowerShell introduces the full power of pipes to Windows, except that rather than piping only raw text - as Unix does - it can pipe rich .NET objects. This means the receiving function at the end of the pipe knows precisely what it's been passed (no more faith-based parsing of raw text), while the objects exposed by PowerShell allow you to access their properties and methods directly in a consistent fashion.
From around the web
advertisement
- Why you have to be left in the dark on OS patches
- Is Microsoft mismanaging Windows on ARM?
- Dealing with spam surrogates
- Why 3G broadband can be better and cheaper than ADSL
- Is Twitter bad for business?
- Publishing your email address isn't a security disaster
- Why you'll need a fax machine to develop iOS apps
- Learning to adapt to the mobile web
- Why you shouldn't use WPS on your Wi-Fi network
- Disabled users suffer when software breaks the rules
- Laptop bag reviews: nine tested
- Sony VAIO T Series Ultrabook review: first look
- Revealed: the military standards and robots HP uses to test its laptops
- Windows 8: multi-monitors and double standards?
- Why is TalkTalk's year-old porn filter suddenly big news?
- Why are laptop screens so far behind mobiles?
- HP EliteBook Folio review: first look
- The shoebox-sized all-in-one printer
- Forget the Ultrabook: here comes the HP Sleekbook
- HP Spectre XT review: first look
- Autonomy's Lynch joins 27,000 on way out of HP
- ICO: no fines for breaking cookie rules
- HP set to slash up to 30,000 jobs
- Government sites to miss cookie deadline
- Microsoft tweaks multi-monitor support in Windows 8
- Apple patches Leopard, despite ending support last year
- Defra opens rural broadband funding applications
- BT's broadband sales surpass calls revenue
- Apple patches multiple security issues
- FBI warns travellers to beware attacks via hotel Wi-Fi
advertisement

