My long reply to a long reply was getting a bit…long, so I thought I’d move it here. Much easier to do the editing in Live Writer anyhow.
You can find the original article and several comments from myself and the author at this blog post: Why PowerShell, Servermanagercmd and co. don’t really rock on the command prompt. I recommend you read the article, it’s a nicely-worded opinion piece. The article deals with the author’s frustrations with Server 2008 command-line utilities (which I agree with) but he then extends those opinions on to PowerShell. I’m making the point that PowerShell addresses most if not all of his frustrations. He also goes into reasons why he thinks the GUI is generally superior for any task, which I also disagree with. (Lots of dangling prepositions today.)
My reply continues below:
Well, the PowerShell rebuttal to ‘difficulty in memorizing commands’ is handled by a cmdlet called “get-command”, and the enforced (by Microsoft’s Common Engineering Criteria internally) consistent naming convention for cmdlets and other related interfaces such as PS Providers. For example, say you want to do something with a mailbox in exchange. You already know the noun you are dealing with–it’s a mailbox. So you type “get-command *mailbox” or “get-command -noun mailbox” and you’ll get several matches. To go a step higher, say you know you want to do something with VMware but you forgot how to connect to the auth server and you have no idea if the verb (the part before the dash) is even called ‘connect’. In a case like that you would use “get-command -pssnapin v*”. That will return all cmdlets which are contained within any snapin which starts with the letter V.
On top of all that, there’s some great IDEs and enhanced editors and graphical consoles whicih make all of this even easier. You can tet real visual studio-like Intellisense on filenames, cmdlets, parameters, .NET types, WMI classes…I certainly can’t memorize every WMI class, but I can type “get-wmiobject win32_net” and hit TAB and voila, there’s a dozen answers popped up in a listbox.
In answer to your point that “The number of software vendors offering tools for administrators has been growing dramatically in the last years.”: I would say YES–and PowerShell is/will be largely seen as responsible for accelerating that trend. VMware, Citrix, IBM and many more vendors are starting to provide PowerShell hooks.
And lastly, of course GUIs are more prone to mistake! How many times have people accidentally clicked on shutdown when they meant logoff (before the start menu was rearranged in what…2003)? I mean…seriously, I could go on and on. GUI accidents could be blamed for spyware installs, too.
If I’m about to make a change in a production environment which may have adverse affects, best practice wisdom would say (yeah, I know that’s like saying “they say” but hear me out) you should make a change plan and a backout plan. You are already doing things to a high level of detail, you might as well script the whole thing. This allows you to not only automate the change, but to validate the change, and if necessary, reverse it. This applies doubly so if you are not the person to make the change. Maybe you are the lead admin delegating a task off to a junior admin or an offshore resource. you tell them:
Run this script, wake me if stuff starts blowing up!
Share This