PowerShell with a Purpose Blog

Need Your Help: Would a book like this be helpful?

I'm considering writing a new book on Windows PowerShell. This will be a significant departure from the other stuff I've written; the goal of this book will, first and foremost, be to TEACH PowerShell - not to serve as a reference. In fact, the outline of the book will closely match the outline I've been using for classes, with the idea that you cover a single chapter a day, spend some time doing exercises you're given, and so on. The order of the topics is very specific, introducing just one or two new things at a time and then building upon them.

This is intended mainly for total newcomers, so I'm deliberately not covering more advanced topics (although I won't rule out a future 'advanced' book if there's interest and demand). So, this isn't intended to be comprehensive - it's supposed to be instructional.

I also intend to pair each chapter with video snippets of the various things I'd normally demo live in a class. Not sure how those videos will be delivered - publishers hate bundling CDs with books these days, so I might just put up a Web site to host them.

So my question is this: Reviewing the outline (which I'll paste in below), is this a book you would have found useful when you were just getting started? As a complete PowerShell novice, are there any topics you would have wanted included that you don't see here?

(apologies for the formatting of the outline - Word doesn't paste well into the Web)

1. Before You Begin
 a. Why You Can’t Afford to Ignore PowerShell
 b. Installing Windows PowerShell
 c. Setting up Your Lab Environment
 d. How to Use this Book
  i. One Hour at a Time
  ii. Completing the Labs
  iii. On Your Own Ideas
iv. "Don’t Read This" Sections
e. A Brief and Unnecessary History of PowerShell
f. The PowerShell Audience Tiers
g. Being Immediately Effective with PowerShell

2. Running Commands
a. Managing Files and Folders - You Know This!
b. Not Just Files and Folders: Introducing PSDrives
c. External Commands, Too
d. The Same Old Commands - Almost
e. Lab
f. Ideas for On Your Own

3. Using the Help System
a. Asking for Help
b. Using Help to Find Commands
c. Interpreting the Help
i. Optional Parameters
ii. Positional Parameters
iii. Parameter Values
iv. Examples
v. Accessing Online Help
d. Lab
e. Ideas for On Your Own

4. The Pipeline: Connecting Commands
a. Exporting to a CSV File
b. Piping to a File
c. Converting to HTML
d. Stopping Services
e. Lab
f. Ideas for On Your Own

5. Adding Commands
a. About Product-Specific “Management Shells”
b. Finding and Adding Snap-Ins
c. Finding and Adding Modules
d. Discovering Newly-Added Commands
e. Finding Help on Newly-Added Commands
f. Playing with Server Manager - via Command-Line!
g. Lab
h. Ideas for On Your Own

6. “Objects:” Just Data by Another Name
a. Objects vs. Text
b. Object Attributes, or “Properties”
c. Object Actions, or “Methods”
d. Discovering Objects: Get-Member
e. Sorting Objects
f. Selecting the Properties You Want 
g. Lab
h. Ideas for On Your Own

7. The Pipeline, Deeper
a. Pipeline Input “ByValue”, or Why Stop-Service Works
b. Parentheses Instead of Pipelines
c. Pipeline Input “ByPropertyName”
d. Creating New AD Users - Fast and Easy
e. When Things Don’t Line Up: Custom Properties
f. Lab
g. Ideas for On Your Own

8. Formatting - and Why it’s Done on the Right
a. About the Default Formatting
b. Formatting Tables
c. Formatting Lists
d. Formatting Wide
e. Custom Columns and List Entries
f. Going Out: To a File, a Printer, or the Host
g. Another Out: GridViews
h. Lab
i. Ideas for On Your Own

9. Filtering and Comparisons
a. Comparison Operators
b. Filtering Objects out of the Pipeline
c. The Iterative Command-Line Model
d. Lab
e. Ideas for On Your Own

10. Remote Control: One on One, and One to Many
a. The Idea Behind Remote PowerShell
b. WinRM Overview
c. Using Enter-PSSession and Exit-PSSession
d. Using Invoke-Command
e. Lab
f. Ideas for On Your Own

11. Tackling Windows Management Instrumentation
a. A WMI Primer
b. The Bad News About WMI
c. Exploring WMI
d. Using Get-WMIObject
e. WMI Documentation
f. Lab
g. Ideas for On Your Own

12. Multitasking with Background Jobs
a. Synchronous vs. Asynchronous
b. Creating a Local Job
c. WMI, as a Job
d. Remoting, as a Job
e. Getting Job Results
f. Working with Child Jobs
g. Commands for Managing Jobs
h. Lab
i. Ideas for On Your Own

13. Working with Bunches of Objects, One at a Time
a. The Preferred Way: “Batch” Cmdlets
b. The WMI Way: Invoking WMI Methods
c. The Backup Plan: Enumerating Objects
d. Lab
e. Ideas for On Your Own

14. Security Alert!
a. Windows PowerShell Security Goals
b. Execution Policy and Code Signing
c. Other Security Measures
d. Security Recommendations
e. Lab
f. Ideas for On Your Own

15. You Call This Scripting?
a. Making Commands Repeatable
b. Parameterizing Commands
c. Creating a Parameterized Script
d. Documenting Your Script
e. One Script, One Pipeline
f. Lab
g. Ideas for On Your Own

16. Variables: A Place to Store Your Stuff
a. Introduction to Variables
b. Storing Values in Variables
c. Storing Lots of Objects in a Variable
d. Declaring a Variable’s Type
e. Commands for Working with Variables
f. A Quick Look at Scope
g. Variable Best Practices
h. Lab
i. Ideas for On Your Own

17. Input and Output
a. Read-Host
b. Write-Host
c. Write-Output
d. Other Ways to Write
e. Lab
f. Ideas for On Your Own

18. Sessions: Remote Control, with Less Work
a. Creating and Using Reusable Sessions
b. Using Sessions with Enter-PSSession
c. Using Sessions with Invoke-Command
d. Commands for Managing Sessions
e. Implicit Remoting: Importing a Session
f. Lab
g. Ideas for On Your Own 

19. From Command to Script to Function
a. Modularizing: One Task, One Function
b. Simple and Parameterized Functions
c. Returning a Value from a Function
d. Returning Objects from a Function
e. Lab
f. Ideas for On Your Own

20. Creating Your Own “Cmdlets” and Modules
a. Functions that Work in the Pipeline
b. Functions that Look Like Cmdlets
c. Bundling Functions into Modules
d. Keeping “Support Functions” Private
e. Lab
f. Ideas for On Your Own

21. Adding Logic and Loops
a. Now We’re “Scripting”
b. The If Construct
c. The Switch Construct
d. The For Construct
e. The ForEach Construct
f. Why Scripting isn’t Always Necessary
g. Lab
h. Ideas for On Your Own

22.  Trapping and Handling Errors
a. Errors and Exceptions
b. $ErrorActionPreference
c. The -ErrorAction Parameter
d. Using a Trap Construct
e. Trap Scope
f. Using a Try Construct
g. The -ErrorVariable Parameter
h. Lab
i. Ideas for On Your Own

23. Debugging Techniques
a. Adding Trace Code
b. Using the Step Debugger
c. What You Can Do in Suspend Mode
d. Working with Breakpoints
e. Lab
f. Ideas for On Your Own

24. Additional Random Tips, Tricks, and Techniques
a. TBD: This is my “catch-all” for stuff I think of as I’m writing the other chapters. 

25. Final Exam: Tackling an Administrative Task from Scratch
a. Your Mission
b. Breaking Down the Tasks
c. Creating and Testing Functions
d. Assembling the Final Script
e. Lab
f. Ideas for On Your Own

26. Never the End
a. Ideas for Further Exploration
b. “Now That I’m Done, Where Do I Start?”
c. Online Resources You’ll Grow to Love

27. PowerShell Cheat Sheet
a. Punctuation 
b. Help File 
c. Custom Property/Column Syntax
d. Pipeline Parameter Input
e. Scripting Construct Syntax
f. When to Use $_

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.