Category Archives: Monad

MSH: What’s with the Codename Monad?

Monad is the codename for Microsoft’s new command shell that is currently in beta.  Monad was coined by Gottfried Leibniz, a German philosopher, mathemetican and statesman from the 17th century.  One of his philosophical works was called Monadology.  Here’s a brief … Continue reading

Posted in Monad | Leave a comment

MSH: Memory hogs function

Here’s a script I use to see which processes are hogging memory.  BTW, I tell MSN Desktop Search my whole hard drive so it usually occupies the #1 slot:   function hogs {    get-process | sort PM -des | select … Continue reading

Posted in Monad | Leave a comment

MSH: Saving and Loading History

MSH keeps track of the various commands you execute.  You can view this history using get-history or the alias ghy.  You can invoke a command in history using invoke-history <number> or the alias ihy <number>.  One of the first things … Continue reading

Posted in Monad | Leave a comment

MSH: Script Blocks as Data

A feature from Lisp that I really like is the ability to pass code around as data.  One of the very cool aspects of Monad is that you can now easily do this.  That is, code can be placed in storage … Continue reading

Posted in Monad | Leave a comment

MSH: Configuring Shell Shortcuts

For project development, we have a special set of location aliases and we need the PATH, LIB and INCLUDE environment variables set up to build against VC 8.0 (VS 2005).  We store the project specific configuration in a script file called BuildEnv.msh.  In … Continue reading

Posted in Monad | Leave a comment

MSH: Reloading Your Profile

As you experiment with your profile ($Home\My Documents\MSH\Micrsoft.Management.Automation.msh_profile.msh) you quickly get tired of having to fire up a new shell to try your changes.  You can reload your profile easily like so: > . $profile $profile is a MSH variable … Continue reading

Posted in Monad | Leave a comment

MSH: Debugging Scripts

The Monad team blog has a series of posts on debugging MSH scripts.  There are some nice trace facilities as well as single-stepping and sub-shell capabilities in MSH.  Check it out: Debugging Monad Scripts, Part 4: set-mshdebug Debugging Monad Scripts, … Continue reading

Posted in Monad | Leave a comment