Part I, Part II, Part III, Part IV
And why is PowerShell such a big deal? Well, I’ll tell you.
It’s Obvious
Is Get-ChildItem easier to type than Dir? No, of course not. But a cmdlet name like Get-WMIOBject is pretty obvious, right? I mean, you can look at the name and figure out what it does, right? That’s why I like PowerShell. No more commands like Netsh or Nbtstat. We get sensible command names.
It’s Pithy
And you can create aliases. Gwmi is easier to type than Get-WMIObject. Makes less obvious sense to the newbie, perhaps, but that’s why products like PrimalScript can convert aliases to cmdlet names for you.
It’s Consistent
What’s the command-line switch used to specify a remote computer name? Is it -M, /c, or -t? With PowerShell it’s always -computerName. Always. And that makes it easier to learn and easier to decipher when you’re reading it – and easier to remember when you’re using it.
It Reads Well
Want to get a list of the top ten processes by handle count?
Get-Process | Sort-Object Handles -descending | Select -first 10Now, that wasn’t so bad, was it? Certainly, reading it makes sense – the cmdlet names make it pretty clear as to what’s going on. Fingers tired from all that typing?
ps | Sort Handles -des | Select -fir 10See, you can be pithy, too. Now, you do that in VBScript and tell me how long it takes. It’s sure as heck more than a single line.
It’s Complete
When a product like Exchange says its “manageable through PowerShell,” it means completely manageable. There’s no need to get a ResKit tool or go to SysInternals to get a tool that does what you need – it’s all in there. Wouldn’t it be great to someday not need SysInternals or Resource Kits, because everything we need is finally built in? Well, that’s the goal of PowerShell.
Yes, it’ll be some time coming. But it’s that goal, that long-term committment Microsoft has made, that makes PowerShell important. It’s solving the problems we’ve had with Windows administration by offering the infinite flexibility of a command-line, the consistency of a well-planned architecture, and the completeness of a firm committment by Microsoft.
So go ahead. Start hating the GUI. Start recognizing why Unix admins have been laughing at us all these years, and start realizing how right they are. Will the GUI go away? No, of course not. Even newbie Unix admins like the GUI, and even old hands will occassionally use a GUI tool when it offers a presentation that’s appropriate for a particular task. And Windows will still have a GUI for the less-experienced amongst us. But the real power, folks, will be in the shell.
Please don’t hate cmd line, it was there for long time and really helped people to grow from there. Just powershell came and it started making difference in the world we shouldn’t start disparaging others. Your intentions might be good, but subject is not certainly not positive.
Well, unfortunately, I really *do* hate cmd.exe, and I pretty much always have – back to the WinNT 3.1 days. I certainly don’t hate anyone who USES it – after all, what choice did you have? – but that doesn’t mean I like it. There’s a lot not to like – in, again, my opinion. I actually think Cmd.exe hindered more than helped. You’re definitely welcome to your opinion, though, and I’m glad you’ve taken the time to share it!