Books & Videos

Table of Contents

  1. Chapter 1 Introducing MSH

    1. Get MSH

    2. Get to Know Verb-Noun Syntax and Cmdlets

    3. Access the Registry Like a Filesystem

    4. Create a Pipeline to Pass Information

    5. Display Data

    6. What's Next?

  2. Chapter 2 Customizing MSH

    1. Load and Save Scripts

    2. Save Keystrokes with Aliases

    3. Work with the Command Line

    4. Make Yourself at Home

    5. Find Out What a Command Will Do Before Running It

    6. What's Next?

  3. Chapter 3 Scripting MSH

    1. The .NET Framework

    2. Work with Structured Objects

    3. Store Information in Variables

    4. Control Script Flow with Comparisons

    5. Do Repetitive Work with Loops

    6. Capture Reusable Behavior in a Function

    7. Transform Objects as They Pass Through the Pipeline

    8. What's Next?

  4. Chapter 4 Managing MSH Scope and State

    1. Control Access to Variables and Functions

    2. Work with Special Characters

    3. Use Wildcards to Define a Set of Items

    4. Take String Comparison Beyond -eq, -lt, and -gt

    5. When Things Go Wrong

    6. What's Next?

  5. Chapter 5 Adding to the MSH Toolkit

    1. Extend the Toolkit with Generic Cmdlets

    2. Work with Text Files

    3. Work with Structured File Formats

    4. How Variables Relate to the .NET Framework

    5. Calling Methods of the .NET Class Library

    6. Using new-object with COM Objects

    7. What's Next?

  6. Chapter 6 Working with Operating System Components

    1. Monitoring the Event Log

    2. Auditing System Services

    3. Get System Information from WMI

    4. Manage Filesystem Permissions

    5. What's Next?

  7. Chapter 7 Putting MSH to Work

    1. Invoke Commands with &

    2. Parse Text-Based Application Output

    3. Fill In the Blanks: Take Input from the Console

    4. Untangle GOTO-Based Batch Files

    5. Recap: Replacing Common Batch File Syntax

    6. Renaming Multiple Files at Once

    7. Match and Replace Content in a Text File

    8. List Recently Changed Files

    9. Counting Types of Files

    10. Find Out Which Command Is Being Run

    11. Downloading Content from the Web

    12. Shorthand for Frequently Used Data

    13. Returning System Uptime

    14. Simple UI Automation

    15. Colorize the Output of get-childitem

    16. What's Left?

  1. Appendix A Syntax and Grammar

    1. Cmdlets

    2. Operators

    3. Data Types

    4. Automatic Variables

    5. Global Variables

    6. Preference Variables

    7. Execution Flow

    8. Loops

    9. Functions and Filters

    10. Resolution Order

  2. Appendix B Standard Cmdlets, Functions, and Aliases

    1. Standard Cmdlets

    2. Standard Functions

    3. Aliases

  3. Colophon