Aaron has a nice post about the command line interface of Server Manager in Windows Server 2008. I have been blogging about the graphical interface of Server Manager a while back. I somehow forgot to mention that Server Manager has a command line version. So I am taking this chance to make up for my omission, although the main intent of this post is to express my view about the value of these new command line capabilities of Vista and Server 2008 in general.

The fact that I forgot to mention it is typical for me because I am not really a friend of the Windows command prompt. On Linux, it is just the opposite. I usually don’t even install KDE or Gnome on a Linux box. But from my point of view, Windows is just not made for this kind of administration. That’s why it is called Windows and not ComanndOS.

However this doesn’t mean that Server Manager’s command line capabilities don’t make sense at all. Actually, they can be very useful under certain circumstances. Usually, they come into play when you have to perform a certain task on many servers. But then you wouldn’t really use these commands on a prompt. Instead you would write a little script that does the job for you.

Usually, when I write such a script, I would try things first on the command prompt in a test environment. This is why such command line extensions of graphical tools can be quite useful. Scripting with Microsoft applications was always possible via APIs. The difference then is that you usually can’t just run a quick test on a command prompt if you write a program this way.

The same applies to PowerShell. The real power of PowerShell is that you can play with the commands while you write a little application. However, when things get a bit more complicated I prefer writing a real program with Visual Studio. So PowerShell like SERVERMANAGERCMD scripts are good for relatively simple automation tasks.

I know, there are many admins who disagree with me here, especially those who grew up in a UNIX environment will feel more at home on the command line. So to a certain degree, it is just a matter of taste if you work on the command prompt or with a GUI. However, I claim that under Windows in most cases you are simply faster with a graphical tool.

Takes one of Aaron’s examples:

SERVERMANAGERCMD -install TS-Terminal-Server,TS-Licensing,TS-Session-Broker -restart

I am not only referring to the fact that commands under Windows and also PowerShell tend to be quite long winded and will just cause finger arthritis in the long run. My point rather is that nobody memorizes such a command for a longer time. If you have to perform the same task after a month or so, you will start wondering if it was “TS-Session-Broker”, or was it just “session broker”? or maybe “TS-Sessionbroker”?

If you are an adventurous admin, you might just try and correct your command afterwards. But usually, you end up checking the manual. Then, you edit your command again, only to find out that Server Manager didn’t really do what you wanted because there was a typo in your command. If you are lucky, Windows would just respond with an error message. If this isn’t just your day, you would have seriously damaged some hundred servers.

One argument often put forward is that you can do more on the command prompt than with a GUI. This might be true in some rare cases, but can hardly be the reason for working always on the command prompt. And in some environments the opposite is true. For instance, you can’t configure server roles with Servermanagercmd.

It is also a big misunderstanding that you have somehow a more technical knowledge of the underlying processes if you work on the command prompt. Whether you understand what you are doing or not doesn’t depend on your typing skills, but on the time you invested to learn about the technical structure of your environment. Pasting a command from a manual and changing some of its parameters doesn’t really require geek knowledge.

That said, I certainly welcome the new command prompt capabilities of Vista and Server 2008. They are very useful in automating tasks in cases where the corresponding graphical tool doesn’t offer (yet) this functionality.

But, then, we usually talk about scripting and not about working on the command prompt. If you need a script for a certain task, it usually means that the developers of an application still have work to do to extend the graphical capabilities of their program. Scripting is nothing else than doing the job for your software vendor. Good graphical tools already come with all the automation you need. After all, every kind of program is only about automation. That’s why computers are so useful.

Thus, if someone from Microsoft tells you that PowerShell really rocks because you can automate all kinds of tasks with it, you can just respond that this is the very idea of any programming language. So I hope that in the future, Microsoft will add a feature to Server Manager that allows you to install server roles on multiple servers with just a mouse click.

The achievement of Windows and other graphic-oriented operating systems is that they made working with computers more human. Graphical interfaces mean more work for computers, but less for humans. Going back to the good old times of MS DOS is certainly not an option.

How about you? Are you working often now on the command prompt because of these new command tools? Or are you just using them to write scripts and continue your daily work like before with graphical tools?