Chapter 1. Introducing MSH


Monad, also known more formally as the MSH Command Shell, is a next generation Windows command shell. Built on top of the .NET Framework, MSH provides a powerful infrastructure for the automation of a wide range of administrative tasks. At last, the command line is a first-class citizen in the world of Windows system management.

It would be unfair to characterize MSH as simply an evolution of the cmd.exe shell, a system whose roots reach back to the days of MS-DOS and before. Indeed, although the standard "host" of MSH is a console application, MSH is designed so that it can be used in other contexts, such as the MMC (Microsoft Management Console). This new shell is built from the ground up with a focus on structured data and today's administrative challenges.

The pipeline, a mechanism for passing data between different functional units, has long been a feature of many shells, including cmd.exe. MSH goes beyond the traditional notion of using text to pass data between the different stages of the pipeline and all of the "prayer-based parsing" that goes with it by allowing the transfer of structured data in the form of .NET objects between the pipeline elements. This self-describing information can be used at any point in a complex sequence and allows any process to operate on data in an intelligent fashion, even pipeline elements that have never seen a given type of data before.

MSH also uses a provider model so that the many types of hierarchical data stores used with Windows systems can be accessed through a single consistent set of commands. In MSH, the mechanism for retrieving folders, files, content, and the current location applies not only to filesystems but also to other stores, such as the registry.

Repeatability and consistency are the two words that capture some of the real value of using MSH. Administering a single machine today is a simple task; Windows offers a well-organized graphical interface for settings and configuration, and Terminal Services makes it easy to effect changes on a server located on the other side of the world. Unfortunately, in simple terms, this model doesn't scale well at all; it takes twice as long to manage 2 machines and 10 times as long for 10. Fortunately, there are management tools such as Systems Management Server (SMS) that ease this burden across the enterprise. Also, technologies such as WSH (Windows Scripting Host) and Perl can be used to automate repetitive tasks. By offering a scriptable language, MSH offers yet another alternative to the manual click-by-click sequence where a one-time investment in authoring a configuration script enables quick replay on a potentially large number of machines with predictable results. Add this all up, and there's a lot of time to be saved.

Let's take a moment to dispel a few rumors about MSH. The new shell is not a programming language to be compared with C#, C++, or VB.NET, yet it does offer a powerful scripting language. Although MSH relies heavily on the .NET Framework, it is first and foremost an administrative tool. As we'll see, MSH is a hybrid, taking the idea of a command shell and combining it with a rich scripting language to form something altogether more useful. MSH isn't going to replace everything in a system manager's toolbox either; in fact, think of MSH as a conduit that provides easy access to pre-existing components whether they are exposed through the .NET Framework, COM objects, or some other mechanism. cmd.exe isn't going away either; MSH even offers support for other command-line utilities that process text. The existing command-line toolset will continue to live, and investments made in console-based applications remain valuable. Finally, MSH is not positioned to encroach on the realm of software builds. While it offers a number of features useful in a large build environment, it's a complement to NMAKE, MSBuild, or Visual Studio Team System, rather than a drop-in replacement for them.

These are just a few of the features of MSH that are causing Windows system administrators to take notice. As a shell, it brings together some powerful concepts by leveraging the .NET Framework and COM, and by allowing existing tools to be reused rather than reinvented. As we'll soon see, a tool like this has a very wide range of uses.




Monad Jumpstart
Monad Jumpstart
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 117

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net