| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
| |
Introducing MSH | |
| |
| |
Get MSH | |
| |
| |
Get to Know Verb-Noun Syntax and Cmdlets | |
| |
| |
Access the Registry Like a Filesystem | |
| |
| |
Create a Pipeline to Pass Information | |
| |
| |
Display Data | |
| |
| |
What's Next? | |
| |
| |
| |
Customizing MSH | |
| |
| |
Load and Save Scripts | |
| |
| |
Save Keystrokes with Aliases | |
| |
| |
Work with the Command Line | |
| |
| |
Make Yourself at Home | |
| |
| |
Find Out What a Command Will Do Before Running It | |
| |
| |
What's Next? | |
| |
| |
| |
Scripting MSH | |
| |
| |
The .NET Framework | |
| |
| |
Work with Structured Objects | |
| |
| |
Store Information in Variables | |
| |
| |
Control Script Flow with Comparisons | |
| |
| |
Do Repetitive Work with Loops | |
| |
| |
Capture Reusable Behavior in a Function | |
| |
| |
Transform Objects as They Pass Through the Pipeline | |
| |
| |
What's Next? | |
| |
| |
| |
Managing MSH Scope and State | |
| |
| |
Control Access to Variables and Functions | |
| |
| |
Work with Special Characters | |
| |
| |
Use Wildcards to Define a Set of Items | |
| |
| |
Take String Comparison Beyond -eq, -lt, and -gt | |
| |
| |
When Things Go Wrong | |
| |
| |
What's Next? | |
| |
| |
| |
Adding to the MSH Toolkit | |
| |
| |
Extend the Toolkit with Generic Cmdlets | |
| |
| |
Work with Text Files | |
| |
| |
Work with Structured File Formats | |
| |
| |
How Variables Relate to the .NET Framework | |
| |
| |
Calling Methods of the .NET Class Library | |
| |
| |
Using new-object with COM Objects | |
| |
| |
What's Next? | |
| |
| |
| |
Working with Operating System Components | |
| |
| |
Monitoring the Event Log | |
| |
| |
Auditing System Services | |
| |
| |
Get System Information from WMI | |
| |
| |
Manage Filesystem Permissions | |
| |
| |
What's Next? | |
| |
| |
| |
Putting MSH to Work | |
| |
| |
Invoke Commands with & | |
| |
| |
Parse Text-Based Application Output | |
| |
| |
Fill In the Blanks: Take Input from the Console | |
| |
| |
Untangle GOTO-Based Batch Files | |
| |
| |
Recap: Replacing Common Batch File Syntax | |
| |
| |
Renaming Multiple Files at Once | |
| |
| |
Match and Replace Content in a Text File | |
| |
| |
List Recently Changed Files | |
| |
| |
Counting Types of Files | |
| |
| |
Find Out Which Command Is Being Run | |
| |
| |
Downloading Content from the Web | |
| |
| |
Shorthand for Frequently Used Data | |
| |
| |
Returning System Uptime | |
| |
| |
Simple UI Automation | |
| |
| |
Colorize the Output of get-childitem | |
| |
| |
What's Left? | |
| |
| |
| |
Syntax and Grammar | |
| |
| |
| |
Standard Cmdlets, Functions, and Aliases | |
| |
| |
Index | |