by Todd Ogasawara
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...
Watching a community grow - Powershell
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...
Windows PowerShell 1.0 Download Site
Microsoft Windows PowerShell Team Blog
Microsoft CodePlex PowerShell Projects Directory
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.
Keith Hill's Blog (Microsoft PowerShell MVP)
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.
|MoW: Many thanks for pointing out your and fellow PowerShell MVP Thomas Lee's blog! I performed a quick last minute search last night and posted the first one I found :-).|
|Gee, if this had been released a while back, it may have made more of a difference for me. I had to have a useful shell environment for windows and ended up installing and using CYGWIN. I love it now and don't think I could administer my SQL Server environment very well without it. It levereged a ton of the great tools and techniques I had learned in Oracle admin on UNIX.|
|Loyd: Totally agree with you! In fact, I may have looked at Windows Server again sooner (vs. Linux) had PowerShell been available years ago. I started working with Windows Servers again a year or so ago to take a closer look at Microsoft Virtual Server 2005 (and now R2). I'm hoping to learn more about PowerShell to use in that environment.|
|bar powershell, Cygwin rules!!!|
Indeed Yohan, I'll look at it but I'm not "excited" about it.
Why would I be exciting about Microsoft once again "inventing" something that already exists?
PowerShell might look like your "Old" shell, but under the hood, it's a completely different "beast"
|I wouldn't say revolutionary. check http://geophile.com/osh/ an object oriented shell written in python, developed since 2004|