Tim Long

Recent Posts

Tags

News

  • Locations of visitors to this page
    View Tim Long's profile on LinkedIn
    Tim Long
    StackOverflow.com
    Serverfault.com
    Astronomy Answers

Community

Email Notifications

TiGra Networks

My Family

Photo Galleries

SBS Groupies

Archives

More Power to your Shell

Vijay from iQubed has blogged about the new Windows Powershell ('WSH'). The point he makes is that Microsoft has always accused Linux of being 'difficult to manage' because of its command line driven interface and now, suddenly when Windows finally gets a decent command line shell, it's the best thing since sliced bread.

To be fair, Vijay, I really think you might want to spend some time with WSH before you compare it to the various flavours of Linux shell. Windows Powershell is a long way ahead of traditional text-based shells such as csh, ksh and so on. The important difference is that Windows Powershell operates fundamentally on .Net objects, not text. In traditional shells, a lot of the complexity was around getting things into the right format, passing the data along a pipe from one command to the next in text format. The things we need to manage on our computers are pieces of software composed of components and objects. WSH deals with these objects directly, passing objects (not text) along the pipeline. The results are not converted into text unless they actually need to be displayed. Dealing directly with objects is very a very powerful concept and gives you the full power of the .Net framework at your command. The power is not immediately obvious because WSH's command line interface belies its true abilities for managing, configuring and automating things.

So why does this make for increased productivity? Consider Exchange 2007. Like all software, exchange is software consisting of a collection of objects and interfaces. These objects can be directly manipulated by WSH – Exchange 2007 can be completely configured by WSH on the command line. Exchange also has a graphical user interface built on Microsoft Management Console. Anything that can be done in the GUI can also be done in WSH. Previously, the MMC snap-in would communicate directly with the software being configured, but in exchange 2007, things are different. The GUI, instead of talking directly to exchange, actually generates a WSH script, which WSH then executes and you can watch it doing this. That script can be captured, saved and edited for later use in similar situations and applied on many computers or across the entire enterprise! Administrators can try things out in the GUI, which writes a script for them that they can save and adapt.

Share this post: | | |

Comments

Vijay Singh Riyait said:

Hi Tim,

I'm not denying the power of Windows Powershell and to be fair I have only briefly used it on the Exchange Server 2007 course. The point is a generic one about how systems are managed and the difference always used to be that Unix/Linux had a shell environment and Windows had a GUI. Microsoft themselves in the Exchange Server 2007 course compare it against ksh. I don't quite agree with you that the ability to pipe the output of one command/application to another is not a powerful feature! This makes for being able to write some really flexible stuff and the number of commands and applications you can do this with is huge. However, it's not about the technical details but how the Administrator perceives it and at the end of the day you are left with a bunch of "scripts" to run! If that was so bad in Unix/Linux, then why is it so good on Windows apart from the fact that it runs on the .NET framework? Can I SSH in to a Windows box and just have access to this Shell environment?

# November 17, 2006 11:28 AM

Tim Long said:

I didn't mean to imply piping was not powerful. Piping is powerful allright - but reducing everything to text is the weakness. Piping objects is much more powerful. This is the true differentce - it's not whether text or GUI is better, it's whether working on text or objects makes more sense. GUIs have always worked at the object level, but now that PowerShell does too, you can have a sensible choice between GUI and command line. Windows Powershell is a revolution in the way command lines work. Microsoft may have been guilty of pointing out the opposition's weaknesses -  that's standard marketing. Now that they've re-invented the command line, why not trumpet it?

Why would you SSH when you can RDP?

# November 19, 2006 11:17 PM

Tim Long said:

(sentiment mine). With Windows Powershell finally released, I hope I never have to use VBScript ever

# November 30, 2006 11:45 PM

Tim Long said:

This cute little demo of Windows Powershell provides a spoken weather forecast. I found this thread on

# December 14, 2006 12:19 AM