“\WindowsPowerShell\Microsoft.PowerShell_profile.ps1.” and “\Microsoft.PowerShell_profile.ps1.” It’s probably the 63 characters in PowerShell that have the most thought behind them. You might ask, “Could it be any longer? More random?” Sure! Other considerations were: [C:\temp] PS:55 > $random = new-object Random [C:\temp] PS:56 > $output = $null; 1..100 | % { $output += [char]$random.Next(97, 122) }; "$output.ps1" wvrybyxwmtcftvhnsvbednocjrdkcyysjtwnhbkkfrgtamxxdbeckjjjgopivnumtjuaxsgrlpylhucvtegauwhajnhrlbnqwsyp.ps1 [C:\temp] PS:57 > $output = $null; 1..100 | % { $output += [char]$random.Next(97, 122) }; "$output.
Bob Muglia’s Microsoft Management Summit (MMS) keynote this morning unveiled a series of exciting announcements surrounding Monad – now known as Windows PowerShell: New Name: The new interactive command line shell, formerly code named “MONAD” will be called Windows PowerShell Availability: Windows PowerShell will be available as a web download in Q4 of 2006 Updated Beta: RC1 is now available for download: http://www.microsoft.com/downloads/results.aspx?freetext=PowerShell This marks a significant milestone in the Windows PowerShell product lifecycle, and brings us an important step closer to getting a finished product in your hands.
In a recent post, Andy describes his quest to use msh.exe as the Emacs interactive shell. He got single commands to work, but the interactive experience does not output any prompts. This will be the experience from any application that redirects Monad’s standard input stream. First, the syntax to make Monad read commands from a redirected input stream is -command –. This places Monad into batch input mode. In the batch input mode, Monad treats standard input as though it is content in a script, allowing a scenario like:
I mentioned earlier that I was going to dissect the dir-LIVE script – it’s taken a bit longer to get to it than I had planned, but I tried to make even this joke a learning opportunity. When you open the script, the first thing you’ll notice is that it’s mostly composed of junk characters. “Wow,” you might say – “how does that turn into a directory listing?” It’s really just a slight-of-hand – not a super cool obfuscation technique.
After people learn about Monad providers, one of the most common things I hear is – “I wish there was one for Team Foundation’s Source Control.” James Manning (from the TFS team) agrees! He wrote one in November of last year, with hopes to push it out as a PowerToy. Instead, he did us one better by putting it up on the MSH Community Extensions workspace! MSH jmanning-test:\> dir -name -r 60406-testing 60406-testing\ConsoleApplication77 60406-testing\ConsoleApplication77\ConsoleApplication77 60406-testing\ConsoleApplication77\ConsoleApplication77.
As pointed out by Scott Hanselman, somehow – my get-answer script is being used as cudgel in a Monad vs Ruby debate. Ted Neward mentions how cool the script is (with a title bound to stir Ruby natives.) Glenn Vanderburg, in kind, jumps to Ruby’s defense. As far as the language goes, Glenn’s main point is that Ruby is much more concise than Monad. This is where the title of my post comes from – it’s easy to win any contest if you’re the
Exchange has been taking significant heat from beta customers that neither it (nor Monad) align strongly with the Windows Live corporate strategy. This is blocking adoption by many customers, especially those accustomed to the new Windows Live Mail (Kahuna) interface. This change brings some of that branding synergy into the get-childitem cmdlet. You can get a prototype of this new functionality here: dir-live.msh.txt (7.23 KB). Rename to “dir-LIVE.msh” after downloading. This is a breaking change, so please provide us with your feedback.
One of the scripts I like the most in my toolbox is the one that gives me answers to questions from the command line. For the past 2 years or so, Encarta has offered an extremely useful “Instant Answers” feature. It’s since been integrated into MSN Search, as well as a wildly popular Chat Bot. MoW showed how to use that feature through a Monad IM interface (via the Conversagent bot,) but we can do a great job with good ol’ screen scraping.
Scott Hanselman and Carl Franklin talked at length about Monad today in the HanselMinutes podcast. It’s very flattering coverage, and hits a lot of the “WOW” points that differentiate Monad from traditional shells. Thanks to Keith for pointing the newsgroups to this, and for introducing Scott to Monad in the first place. Good job, Scott, and welcome to the family :) [Edit: Monad has now been renamed to Windows PowerShell. This script or discussion may require slight adjustments before it applies directly to newer builds.
Today marks the first day of Spring – a date often hailed often as one with equal amounts of night and day. This is untrue because most of us live somewhere other than the equator, because the Sun is larger than an idealized geometric point, and because our atmosphere causes refraction. Truthfully, it is more of an Astronomical and geometric novelty than it is a practical one. It’s still an interesting geometric novelty, though.