THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Allen White

For Servers the Command Line Rules

When I first learned to program, back in the fall of 1968, the first 'word' the computer I connected to said to me was 'READY'.  That summed it up neatly. The computer was ready to do work, it was just waiting for me to give it instruction.

As I progressed through my knowledge of programming and my focus on providing businesses useful applications for making decisions, whether my interface to the computer was via typewritten prompts on a scroll of paper, green text glowing from a black CRT, on through the current era of graphical user interfaces the fact remains that the computer is still waiting for me to give it instruction. It is READY.

Along that path I moved from developer (we called ourselves 'programmers' then) through network and communications specialist, to Unix and Windows admin, to database administrator, the focus was always on keeping the computer busy at all times, to keep it from waiting for instructions from us.

Somewhere along the line, server operating systems were given a graphical user interface (GUI). Why? Don't know, I wasn't the guy making that decision. It goes against the need to keep it busy.  GUIs offer choices. Choices take away from keeping that system busy. A lot of server admins who only learned their craft on Windows Servers seem to only understand how to manage the system via the GUI, and to me that's a shame. They've missed the point.

In 2006, Microsoft introduced PowerShell, a true shell environment for Windows. HOORAY! I've got the command line environment again (without resorting to the brain-dead cmd.exe) with the great shell features I grew to love when working as a Unix admin, like the pipeline.

In 2009, Microsoft released PowerShell v2, with it's built-in Integrated Scripting Environment (ISE). PowerShell v2 made great strides over the original v1, and I applauded their efforts. In v2 they added a cmdlet called Out-GridView.  What? Why are you putting a GUI output in my scripting language?

Windows Server 2008 introduced Server Core, a version of the operating system that doesn't include the GUI. Awesome! We can now focus on getting lots of work done again! An added bonus for me is that SQL Server 2012 will support Server Core, so we don't have to slow down the servers with all that graphical rendering (and it does take considerable resources to accomplish this.)

Now, PowerShell has great use on the desktop as well as on the servers, and from that aspect, having GUI output does make sense. The ISE is also useful for writing code, though I've spent a lot of years writing a lot of code without using a GUI to do so.  I don't use it because, for the most part, I don't need it. I'd rather have the full command window to see my results than slice my workspace into three parts and work within one of them. But that's me.

What's my point? There are a wealth of tools, and they're designed to make you or your computer more efficient. Use the ones you find most convenient, that works the way you want to work, and use it. What works for you may not work for me, and vice versa.  The tools I use to get the work done don't define the value of my work, the work I produce does.

The important thing is to get the most work done, and for me that means working from the command line, also known as PowerShell.exe.

Published Wednesday, October 26, 2011 4:38 PM by AllenMWhite



ALZDBA said:

Hmm, does the lack of comments to this post mean:

- people don't care (they should)

- people missed the point (I doubt that)

- people just don't want to change their good old DOS scripts ? ( I also was reluctant to test and adopt, until I got to see its potential and ease of use )

Any way, people should get started adopting powershell. It has such big potential because you can hook up most - if not all - you may ever need and so all they need to learn is a single programming language and the api usage of their target domain(s).

I support your point 100% !

October 28, 2011 3:12 PM

Jeff Moden said:

I agree 100%.  There are limits to what you can do with a GUI because the GUI was only designed to do certain things.  Computers are an "imagination limited tool" and if you have a limited imagination, it will be a limited tool. ;-)

I'm a bit ashamed to admit that I've not yet taught myself the wiles of Powershell.  Does anyone have a recommendation as to what a good book for teaching one's self Powershell is?

October 29, 2011 11:33 AM

John Sterrett said:


I got to play with Windows Server Core at PASS this year. I was quite impressed. Keep in mind my opinion might not count as I also like using my macbook pro.


October 29, 2011 8:15 PM

Mark Broadbent said:

Allen, awesome post. You are right in the point (I think) you are making in that the command line can be used as a launch pad for a multitude of operations irrespectively of what the end result or output is. The only important thing is that it is giving you immense power to do what you want in an easily scriptable and consumable form.

Can't wait to see what future versions of Windows and PowerShell are going to give us.

October 30, 2011 3:37 PM

David said:

I started learning PS in 2009. Upgraded to v2 this year, have never looked back. I've been privileged to work in large SQL environments, with 140 SQL servers. PS then really comes into its own. See my blog for some of the automation I've rolled out with PS. @Jeff, I have a great PS ebook that I can email you. Mail me at

October 31, 2011 12:37 AM

Reiner said:

Allen, very good point. I'm in the process of learning PS/SMO/AMO. What really saddens me though is how little information is out there on using PS/AMO. The situation is a bit better with PS/SMO but still could be better. There are a number of guys like you who could teach the community a bunch by posting more on those three topics combined.

Go for it. I'd love to learn from you!!!

October 31, 2011 1:00 PM

Frank Hell said:

November 1, 2011 8:52 AM

ALZDBA said:

This nice article also has nice refs about where to start ...

I'm sorry the url has a fixed ip address and no name, but anyways:

Demise of the Graphical User Interface (GUI)

Posted on November 11, 2011 by Kyle Smith

November 12, 2011 4:32 PM

Marco Shaw said:

**SQL novice**

PowerShell SQL AMO in SQL 2012 RC0:

November 20, 2011 6:51 AM
New Comments to this post are disabled

About AllenMWhite

Allen White is a consultant and mentor for Upsearch Technology Services in Northeast Ohio. He has worked as a Database Administrator, Architect and Developer for over 30 years, supporting both the Sybase and Microsoft SQL Server platforms over that period.

This Blog


Privacy Statement