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.
advertisement
- Getting to grips with Microsoft's IT Health Environment Scanner
- Virtualise your servers
- The changing face of travel gadgets
- Build your own distributed file system
- The bulletproof Dell that costs an arm and a leg
- Microsoft Office 2010 Technical Preview: Q&A
- Lawnmowers, the TyTN II and one odd insurance request
- There'll never be a bulletproof OS
- How far can we trust apps?
- Five nice touches in Outlook 2010
- Need a bit of extra Christmas cash? Grass up your boss, says BSA
- Photoshop Mobile on Android review: first look
- ATI Radeon HD 5970: 42% more expensive in the UK
- Office 2010 Beta – 32-bit or 64-bit – The Choice is Clear
- Why Britain's watchdogs have fewer teeth than goldfish
- Tabbed documents: how to make Office 2010 great
- Outlook 2010 People Pane – does it spell death to Xobni
- Microsoft Outlook 2010 screenshots
- Co-Authoring in Word 2010 and SharePoint Foundation 2010
- Microsoft Outlook 2010 screenshots: Backstage view
- £90 million buys South Yorkshire 25Mbits/sec broadband
- Twitter ready to splash out... and run ads
- LogMeIn Express offers fuss-free screen sharing
- Kindle calms customers with library update
- Photoshop app arrives on Android
- Google: we won't remove "disturbing" Obama image
- Internet Explorer hit by zero-day misery
- Sky Player shows up in Windows 7
- Tweetlevel reveals most influential Twitterers
- Apple "refuses to repair smokers' Macs"
advertisement
Printed from www.pcpro.co.uk


