Monad, available for Windows Server 2003, Windows XP, and Windows Vista, is the future of Windows administration. From setting up automated build environments to managing 200 desktops in an organization, anything that reduces the number of repetitive management steps is a real win. This is the promise of Monad, the powerful new command shell and language from Microsoft that simplifies Windows system management. Known more formally as MSH, Monad offers many innovative features in the field of system administration and management-all designed to save you time and aggravation, and to replace a host of Windows management tools with a single, unified shell.Built on the .NET Framework, Monad provides a powerful infrastructure for the automation of a wide range of administrative tasks. And there is no better way to master these automated offerings than with Monad. The book is an exciting tour of some of the new capabilities that Monad puts into the hands of system administrators and power users, and is the perfect complement to existing Monad documentation.With more than 40 hands-on activities, the book covers every angle, from using MSH commands and its object-oriented pipelines to query your systems and generate reports to writing scripts that automate existing tasks. Adding to the lure is the fact that the book is written by Microsoft manager, Andy Oakley-so you can be certain that it's teeming with inside information. Monad lets you see for yourself how Monad can significantly improve your productivity.Because the Monad technology has wide appeal, so, too, does this compact guide. Developers, administrators, and power users alike can all benefit from its insight. If you're someone who habitually drifts toward the c-m-d keys, knows all of the switches to most command tools, or spends time authoring batch files to solve new challenges, this book is right up your alley.
Inhaltsverzeichnis
Foreword;
Preface;
Who This Book Is For;
How This Book Is Organized;
What You Need to Use This Book;
Conventions Used in This Book;
Using Code Examples;
How to Contact Us;
Safari® Enabled;
Acknowledgments;
Chapter 1: Introducing MSH;
1.1 Get MSH;
1.2 Get to Know Verb-Noun Syntax and Cmdlets;
1.3 Access the Registry Like a Filesystem;
1.4 Create a Pipeline to Pass Information;
1.5 Display Data;
1.6 What's Next?;
Chapter 2: Customizing MSH;
2.1 Load and Save Scripts;
2.2 Save Keystrokes with Aliases;
2.3 Work with the Command Line;
2.4 Make Yourself at Home;
2.5 Find Out What a Command Will Do Before Running It;
2.6 What's Next?;
Chapter 3: Scripting MSH;
3.1 The .NET Framework;
3.2 Work with Structured Objects;
3.3 Store Information in Variables;
3.4 Control Script Flow with Comparisons;
3.5 Do Repetitive Work with Loops;
3.6 Capture Reusable Behavior in a Function;
3.7 Transform Objects as They Pass Through the Pipeline;
3.8 What's Next?;
Chapter 4: Managing MSH Scope and State;
4.1 Control Access to Variables and Functions;
4.2 Work with Special Characters;
4.3 Use Wildcards to Define a Set of Items;
4.4 Take String Comparison Beyond -eq, -lt, and -gt;
4.5 When Things Go Wrong;
4.6 What's Next?;
Chapter 5: Adding to the MSH Toolkit;
5.1 Extend the Toolkit with Generic Cmdlets;
5.2 Work with Text Files;
5.3 Work with Structured File Formats;
5.4 How Variables Relate to the .NET Framework;
5.5 Calling Methods of the .NET Class Library;
5.6 Using new-object with COM Objects;
5.7 What's Next?;
Chapter 6: Working with Operating System Components;
6.1 Monitoring the Event Log;
6.2 Auditing System Services;
6.3 Get System Information from WMI;
6.4 Manage Filesystem Permissions;
6.5 What's Next?;
Chapter 7: Putting MSH to Work;
7.1 Invoke Commands with &;
7.2 Parse Text-Based Application Output;
7.3 Fill In the Blanks: Take Input from the Console;
7.4 Untangle GOTO-Based Batch Files;
7.5 Recap: Replacing Common Batch File Syntax;
7.6 Renaming Multiple Files at Once;
7.7 Match and Replace Content in a Text File;
7.8 List Recently Changed Files;
7.9 Counting Types of Files;
7.10 Find Out Which Command Is Being Run;
7.11 Downloading Content from the Web;
7.12 Shorthand for Frequently Used Data;
7.13 Returning System Uptime;
7.14 Simple UI Automation;
7.15 Colorize the Output of get-childitem;
7.16 What's Left?;
Appendix A: Syntax and Grammar;
A.1 Cmdlets;
A.2 Operators;
A.3 Data Types;
A.4 Automatic Variables;
A.5 Global Variables;
A.6 Preference Variables;
A.7 Execution Flow;
A.8 Loops;
A.9 Functions and Filters;
A.10 Resolution Order;
Appendix B: Standard Cmdlets, Functions, and Aliases;
B.1 Standard Cmdlets;
B.2 Standard Functions;
B.3 Aliases;
Colophon;