I think the first O’Reilly Hacks book I bought was Rob Flickenger’s Linux Server Hacks. It weighed in at a lean mean 221 pages and 100 concise and useful hacks. A good number of the hacks included scripts or script fragments written in Bourne/Bash shell scripts or Perl. There is a heck of a lot of power in relatively short and easy to read scripts for Linux (UNIX, BSD, Mac OS X). And, although there are very nice Windows ports of my two dynamic languages of choice (Python and Ruby), I never got the urge to write scripts for Windows.
My interest in programming using a scripting language for Windows was piqued a year or so when I started looking at what was then called Monad the MSH Command Shell. It seemed to provide the kind of rich shell I was used on UNIX/Linux boxes combined with a powerful scripting language. The old DOS box command shell was obviously not long for this world (at least for power users). In November 2006, Monad was released to production as PowerShell 1.0 for Windows XP and Windows Server (the Vista version was not ready at the time though the Release Candidate for Vista is available for download now).
Bill Hilf (Microsoft Open Source Software Lab) seems just as excited based on his recent blog item…
In it he points out a bunch of PowerShell related projects and tools that I was totally unaware of. You should definitely read the blog to dig into his PowerShell finds.
I’ve got a couple of PowerShell related items to share myself before you click to read Bill’s blog though.
First, PowerShell doesn’t replace the good old DOS box. You can see in my screen segment capture below that I have the DOS box overlapping PowerShell. The DOS box launches a bit faster than PowerShell on my pokey old Athlon 3200+ PC (no Core 2 Duo PC for me yet, sniff, sniff :-). So, it still has a place for a quick IPCONFIG or PING network check.
Second tip. What if the Linux muscle memory in your fingertips are strongly ingrained? Try typing get-process in PowerShell. Looks kind of familiar huh? But, perhaps it seems like typing too many letters? OK, try typing more familiar (for UNIX/Linux users) ps. Ah, much better, right? Now try ls. And, yep, DOS’ DIR still works too. There are some familiar shell commands that work and some don’t. You can find the complete list of aliased commands by typing either get-alias or simply alias (which are aliases for each other of course :-).
Here are a bunch of PowerShell related sites you might want to take a look at…
Finally, being designated a Microsoft Most Valuable Professional in the Mobile Devices category, I wanted to point out the blog of an MVP in the PowerShell area.
BTW & FYI: MVPs are not Microsoft employees. You can learn more about the MVP designation at: Microsoft Most Valuable Professional Overview.
I’m really hoping to see a bunch PowerShell script utilities and applications being developed and released with Open Source licenses. I think it will go a long way to promote its use and help those of us who are newbies to it (pretty much 99% of the world at the moment I would guess) get up to speed quickly.