You know, this whole “why do we need a shell [meaning PowerShell] when we have a perfectly good GUI?” is a sentiment I really have trouble understanding. Literally – I can’t wrap my head around the premise. I guess that’s because I started with computers back in the MS-DOS days, when the command-line was all we had. Even when Windows 3.0 (the version version I installed) shipped, I was constantly dropping down to DOS – the real OS – to tweak Config.sys and AutoExec.bat. I’ve always felt that the GUI was a layer between me and the operating system.
I’ll give you a perfect example: In Windows NT 3.51, you could open the Server Manager application, click on a server, and get a list of open resources. Now, scrolling through a dialog box full of open resources is no fun, but it was the only way to find out who had a given file open at a particular time. Then I discovered VBScript, and I wrote a script which did essentially the same thing, only much faster. And with less boredom. And with fewer mistakes – in a list of thousands of entries, it’s easy to miss the one you were looking for. Yay, scripting! Which, really, was getting “under” the GUI.
With PowerShell, it’s even easier. I might have a cmdlet called Get-Resources and write something like this:
Get-Resource | Where {$_.Path = "c:\file"} | select username
Easy, easy! Of course, this doesn’t really work – I haven’t written a Get-Resource cmdlet, yet (hmm…). The point is that this simple command (and okay, maybe it’s blurring the line between a shell and scripting, but any Unix admin would call this a “command”) replaces dozens of lines of VBScript and replaces hours of my life spent scrolling through lists. I hated that GUI. And that is why PowerShell is so important to me.
The beauty of a command line shell is that it doesn’t have any "interface fluff". From my experience as a programmer it’s wonderful to drop into a shell to experiment with a series of ideas when manipulating data before implementing the actual solution for real. I’ve always felt a GUI simply gets in the way that’s why I appreciate something like PowerShell because it’s beginning to feel like UNIX on Windows. I feel naked without a powerful shell / scripting language at my fingertips.