Microsoft PowerShell 2: Going Beyond its UNIX/Linux Insprirations

by Todd Ogasawara

If there is one Microsoft product that openly gets inspiration from and gives credit to UNIX and GNU Linux/Open Source, it is Microsoft PowerShell.

How open source has influenced Windows Server 2008

The PowerShell team is at the Microsoft Management Summit (MMS) in Las Vegas this week. And, they posted the PowerPoint 2007 slide deck for a peek at PowerShell V2 on their blog...

MMS: What's Coming In PowerShell V2

I'm not at the MMS. So, I didn't see the presentation. However, the slidedeck (downloadable from the blog entry linked above) lists four main topic areas (labeled Themes in the slides):

1. GUI over PowerShell
2. Production Scripting
3. Universal Code Execution Model
4. Community Feedback

In the Linux world, I've been asking people to use Python or Ruby instead of Bash scripts so that we don't have to refactor from one more basic scripting language (say Bash) to a more sophisticated object oriented dynamic language (say Python or Ruby). In the Windows world, the jump has been from DOS batch language to Windows scripting (which I never liked) or Visual Basic/C#. That's not really an option at all IMHO. PowerShell, on the other hand, brings Windows into the 21st century for system administrators who may not come from a deep software development background. It gives them a first class language and .Net citizen as an alternative to DOS batch (I hesitate to call it a language).

Though PowerShell still seems to have a strange look to it from my point of view, its ability to deal directly with .Net objects gives it the ability to more easily deal with systems level information than we have on Linux with even high-level dynamic languages like Python and Ruby.

Me? I'm still waiting for a binary ready-to-install IronRuby to test with Windows Server 2008 :-)


2008-05-02 08:09:56
Though it's nice to have more utility at the command-line, one of the reasons that I switched to the mac as a developer was because of the crappy command-line *window* interface.
Todd Ogasawara
2008-05-02 09:12:03
Jeremy: I'm typing this comment response on an iMac :-) That said, I use Vista Business Edition on a notebook everyday. Its UI is ok. It is the UAC, slow folder access, and incredibly slow file copy times (even after installing SP1) that drives me batty. The odd thing is that Windows Server 2008, which is said to share much of the Vista codebase, is very very responsive.
2008-05-02 10:02:38
Todd: Oh, the general interface is okay. I was speaking more about the command-line interface, the ability to resize, control font, etc. that are really nice about a terminal window. I was excited when I found out the MS was going to make their command-line interface more useful, but when I saw initial builds coming out, it appeared that the actual command prompt window was still kind of inflexible.
2008-05-08 18:13:54
afaik, there is no equivalent to Powershell on Linux.

Powershell is really a great idea. Not a scripting language and not a programming language, but the ability to deal with the OS in terms of objects.

I hope it gets replicated on Linux.

Dustin Puryear
2008-05-11 19:48:54
elam- There really is nothing to "replicate" for Powershell from Windows to Linux. All of the functionality, plus some, is already available and has been for a very long time with Linux and UNIX. What Powershell brings perhaps is the OO interface (somewhat), but that's not really too new.

But what Powershell brings to Windows is pretty cool, but the coolness or even the OO isn't the big thing here, not to me at least. What Powershell is *starting* to deliver to Windows is *gasp* access and consistency.

As an interoperability shop, we do both scripting and real software dev on UNIX and Windows, and the fault of Windows scripting has always been the sheer inconsistency of everything. Some tools return a reasonable RV, other's don't, some return command output on error, success, or both, while other's do it the opposite way.

With UNIX you get a consistent interface to your tools, even if you haven't used the tools before. Not so much with Windows.

Here is what I hope for with Powershell:

1. That it sticks around for a while. If it gets replaced in the next several years, then nothing has changed.

2. That more and more application and system interfaces are exposed in a consistent way with Powershell.

3. That it is transparent to use Powershell for any task, including general scripting, Exchange, SQL Server, whatever.

That's when Powershell will really kick in.