| | Copyright |
| | 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 |
| | | Section 1.1. Get MSH |
| | | Section 1.2. Get to Know Verb-Noun Syntax and Cmdlets |
| | | Section 1.3. Access the Registry Like a Filesystem |
| | | Section 1.4. Create a Pipeline to Pass Information |
| | | Section 1.5. Display Data |
| | | Section 1.6. What's Next? |
| | Chapter 2. Customizing MSH |
| | | Section 2.1. Load and Save Scripts |
| | | Section 2.2. Save Keystrokes with Aliases |
| | | Section 2.3. Work with the Command Line |
| | | Section 2.4. Make Yourself at Home |
| | | Section 2.5. Find Out What a Command Will Do Before Running It |
| | | Section 2.6. What's Next? |
| | Chapter 3. Scripting MSH |
| | | Section 3.1. The .NET Framework |
| | | Section 3.2. Work with Structured Objects |
| | | Section 3.3. Store Information in Variables |
| | | Section 3.4. Control Script Flow with Comparisons |
| | | Section 3.5. Do Repetitive Work with Loops |
| | | Section 3.6. Capture Reusable Behavior in a Function |
| | | Section 3.7. Transform Objects as They Pass Through the Pipeline |
| | | Section 3.8. What's Next? |
| | Chapter 4. Managing MSH Scope and State |
| | | Section 4.1. Control Access to Variables and Functions |
| | | Section 4.2. Work with Special Characters |
| | | Section 4.3. Use Wildcards to Define a Set of Items |
| | | Section 4.4. Take String Comparison Beyond -eq, -lt, and -gt |
| | | Section 4.5. When Things Go Wrong |
| | | Section 4.6. What's Next? |
| | Chapter 5. Adding to the MSH Toolkit |
| | | Section 5.1. Extend the Toolkit with Generic Cmdlets |
| | | Section 5.2. Work with Text Files |
| | | Section 5.3. Work with Structured File Formats |
| | | Section 5.4. How Variables Relate to the .NET Framework |
| | | Section 5.5. Calling Methods of the .NET Class Library |
| | | Section 5.6. Using new-object with COM Objects |
| | | Section 5.7. What's Next? |
| | Chapter 6. Working with Operating System Components |
| | | Section 6.1. Monitoring the Event Log |
| | | Section 6.2. Auditing System Services |
| | | Section 6.3. Get System Information from WMI |
| | | Section 6.4. Manage Filesystem Permissions |
| | | Section 6.5. What's Next? |
| | Chapter 7. Putting MSH to Work |
| | | Section 7.1. Invoke Commands with & |
| | | Section 7.2. Parse Text-Based Application Output |
| | | Section 7.3. Fill In the Blanks: Take Input from the Console |
| | | Section 7.4. Untangle GOTO-Based Batch Files |
| | | Section 7.5. Recap: Replacing Common Batch File Syntax |
| | | Section 7.6. Renaming Multiple Files at Once |
| | | Section 7.7. Match and Replace Content in a Text File |
| | | Section 7.8. List Recently Changed Files |
| | | Section 7.9. Counting Types of Files |
| | | Section 7.10. Find Out Which Command Is Being Run |
| | | Section 7.11. Downloading Content from the Web |
| | | Section 7.12. Shorthand for Frequently Used Data |
| | | Section 7.13. Returning System Uptime |
| | | Section 7.14. Simple UI Automation |
| | | Section 7.15. Colorize the Output of get-childitem |
| | | Section 7.16. What's Left? |
| | Appendix A. Syntax and Grammar |
| | | Section A.1. Cmdlets |
| | | Section A.2. Operators |
| | | Section A.3. Data Types |
| | | Section A.4. Automatic Variables |
| | | Section A.5. Global Variables |
| | | Section A.6. Preference Variables |
| | | Section A.7. Execution Flow |
| | | Section A.8. Loops |
| | | Section A.9. Functions and Filters |
| | | Section A.10. Resolution Order |
| | Appendix B. Standard Cmdlets, Functions, and Aliases |
| | | Section B.1. Standard Cmdlets |
| | | Section B.2. Standard Functions |
| | | Section B.3. Aliases |
| | About the Author |
| | Colophon |
| | Index |