Microsoft PowerShell

by Todd Ogasawara

Linux Server Hacks & Monad books
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.

PowerShell Window & DOS box window

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

Windows PowerShell

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.


8 Comments

/\/\o\/\/
2007-01-24 04:33:30
Hi Todd,


Glad to see some more excitement about PoSH,
welcome to the community !
I'm also an MVP on PowerShell, and have a lot of information on my blog.


my blog http://thePowerShellGuy.com


and another blog by a MVP on PowerShell Thomas Lee's blog :


http://tfl09.blogspot.com/


also the Newsgroup Microsoft.public.windows.powershell
is very active, and a great resource for learning PowerShell be sure to check it out !


May the Power of the Shell be with you !


Greetings /\/\o\/\/

Todd Ogasawara
2007-01-24 08:22:22
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 :-).
Loyd
2007-01-26 06:56:57
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.
Todd Ogasawara
2007-01-26 08:40:36
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.
yohan
2007-01-29 17:25:36
bar powershell, Cygwin rules!!!
NZG
2007-02-01 07:35:06
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?



/\/\o\/\/
2007-02-02 13:20:38
PowerShell might look like your "Old" shell, but under the hood, it's a completely different "beast"


An shell that uses objects in the pipeline, is revolutionary


but take a look and be suprised ;-)


Greetings /\/\o\/\/

ittay
2007-05-15 01:23:05
I wouldn't say revolutionary. check http://geophile.com/osh/ an object oriented shell written in python, developed since 2004