Skip navigation

Dueling Command Lines in Windows Server 2008

Dueling Command Lines in Windows Server 2008

In this corner, in the black trunks, we have the reigning champion, that last unwelcome reminder of MS-DOS still lingering in our beloved NT-based operating system. You know him as cmd.exe, the Windows Command Prompt. [Cheers, boos erupt from the audience.]

In the other corner, in the newish-looking navy blue trunks, we have the cocky young newcomer, a .NET-based based bit of developer mashup that admins both fear and respect. He's the Windows PowerShell, and he's breathing down CMD's aging virtual neck like a freight train barreling down the track. [Scattered cheers, noncommittal murmuring as audience members look askance to see if everyone else there is as unclear about PowerShell as they are.]

And this, ladies and gentlemen, is the situation in which we find ourselves. Microsoft, finally, has gotten the command line bug, and big time. The only problem is, they're offering admins, IT professionals, developers, and other power users two competing command line environments, one old, one new, one based in the murky past, one wrapped in the richest and goodness of Microsoft's modern developer frameworks. It should be obvious which you'd want to focus on, right?

To help you make the decision, consider Wikipedia, voted least likely to be accurate in its high school year book, which notes that Command Prompt will be replaced by PowerShell in 2007 but is present in Windows Vista "for backwards compatibility" reasons only. Oh, were that so. It would make life so much simpler. But the reality, sadly, is somewhat more complicated.

In Windows Server 2008 (codenamed "Longhorn Server," see my review of Beta 3), the major version of Windows Server due late this year, Microsoft has provided users with both Command Prompt and PowerShell. But here's the thing. PowerShell was a late addition. Indeed, as recently as a day-long December 2006 Windows Server briefing, Microsoft was telling me and others that PowerShell would not be included in Windows Server 2008.

To bolster this claim, Windows Server 2008 includes some amazing new Command Prompt-based utilities. Chief among these are servermanagercmd.exe, which Microsoft tells me provides 100 percent of the functionality of the new Server Manager GUI, but in a scriptable, automatable command line version. And then there's the most tantalizing evidence of all: Server Core, arguably the most exciting new Windows Server 2008 feature, utilizes Command Prompt, and only Command Prompt, as its native interface. And Microsoft even created a new Server Core-specific Command Prompt utility, oclist.exe, for managing virtually all of Server Core's workloads. (A new GUI-less version of dcpromo.exe is used to set up the server as a domain controller using an answer file.)

In the face of this sudden rush to make Command Prompt more relevant than ever, Microsoft dropped a bombshell with the recent release of Windows Server 2008 Beta 3: They've changed their minds, and PowerShell will be included in the product after all. Sadly, the addition of PowerShell to Windows Server 2008 comes a bit late in the game for, say, a PowerShell version of servermanagercmd.exe, but Microsoft is looking to the future for a community of PowerShell enthusiasts to fill that and other management voids. And though the company isn't providing any details, its working to create the subset of the .NET runtime needed to get PowerShell working in Server Core. It's only a matter of time.

So we have a temporarily revitalized Command Prompt and a vastly more useful PowerShell, which while technically complex, will eventually provide Windows with a first class command line and scripting environment that dramatically surpasses what's available today in UNIX. Microsoft has even confirmed rumors that it will begin building Windows Server components the UNIX way: Command line first, with GUI tools built on top of the command line stuff. It's a miracle.

Here's the problem. I don't have to tell the admins in the audience how overworked you already are, and now that you have two command line environments to worry about in Windows Server 2008, your life is going to get harder than ever. The timing is just bad, and my fear is that concerns over this and other big changes in Windows Server 2008 will slow the growth of this version. So while I'm sure PowerShell is the future, it's not the immediate future. And for the next few years, at least, you're going to want to wrap your mind around two command line environments. Good luck.

This article originally appeared in the May 8, 2007 issue of Windows IT Pro UPDATE.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.