This portable reference to PowerShell summarizes the command shell and scripting language and provides a concise guide to the many tasks that make PowerShell so useful. If you're a busy administrator and don't have time to plow through huge books or in-depth online searches, this is the ideal on-the-job tool.
Written by PowerShell team member Lee Holmes and excerpted from his PowerShell Cookbook, this edition offers up-to-date coverage of Windows PowerShell 5.1 and open source PowerShell Core up to 7 and beyond.
Beginning with a guided tour of PowerShell, this handy guide covers:
* PowerShell language and environment
* Regular expression reference
* XPath quick reference
* .NET string formatting
* .NET DateTime formatting
* Selected .NET classes and their uses
* WMI reference
* Selected COM objects and their uses
* Standard PowerShell verbs
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
# PowerShell Pocket Reference, 3rd Edition — Reading Guide
## 【One-Line Pitch】
A compact, on-the-job reference for busy administrators and scripters who need quick answers about PowerShell's language, cmdlets, and integration with .NET, WMI, COM, and XML—covering both Windows PowerShell 5.1 and cross-platform PowerShell Core 7+. If you already know the basics and want a portable cheat sheet, this is your book.
---
## 【Book Arc】
- **Opening (~0%–6%)**: Introduces the book's purpose as a distilled reference extracted from the author's larger *PowerShell Cookbook*, and lays out the "pillars" of PowerShell—interactive shell, cmdlets, object pipelines, discovery, scripting, and technology bridging. Sets expectations for what the pocket guide will cover.
- **Early (~6%–19%)**: Guided tour of the interactive shell: launching PowerShell, navigating the filesystem with familiar DOS/Unix commands, understanding the Verb-Noun cmdlet naming convention, using aliases, tab completion, and positional parameters. Establishes the core mechanics of daily command-line use.
- **Early (~19%–28%)**: Deep dive into object-oriented fundamentals: strings as .NET objects, storing process objects in variables, calling methods, using administrative constants (MB, GB), building pipelines with `Where-Object`, `Sort-Object`, and `Format-Table`, and safety features like `-WhatIf` and `-Confirm`.
- **Early (~28%–34%)**: Discovery and learning tools: `Get-Command` for finding commands, `Get-Help` for documentation, and `Get-Member` for inspecting object members. Introduces ad hoc script development by exporting session history to script files.
- **Middle (~34%–44%)**: Technology bridging: working with XML content, WMI/CIM queries, Active Directory via ADSI, and COM objects—showing how PowerShell unifies previously isolated Windows technologies under one syntax.
- **Middle (~44%–53%)**: Advanced environment features: navigating the certificate store as a filesystem-like provider, plus language constructs like `PSCustomObject` and the `DATA` keyword for data-language evaluation. Concludes the tour with a note that the book covers much more beyond this introduction.
---
## 【Key Takeaways】
- **PowerShell is first an interactive shell, then a scripting language** (Early): The design philosophy prioritizes command-line productivity, so everything you learn interactively transfers directly to scripts. This means you can start simple and grow into automation.
- **Cmdlets follow a consistent Verb-Noun pattern** (Early): Once you know common verbs like `Get`, `Set`, `Start`, and `Stop`, you can predict how to work with unfamiliar nouns (processes, services, files). This consistency dramatically reduces the learning curve.
- **Everything is an object, not text** (Early): Strings, processes, and command output are all .NET objects with properties and methods you can access directly (e.g., `"Hello World".Length`). This makes data manipulation far more powerful than traditional text-based shells.
- **Pipelines pass objects, enabling composable commands** (Early): Chaining `Get-Process | Where-Object | Sort-Object | Format-Table` lets you filter, sort, and format in one line—a pattern you'll use constantly for administrative tasks.
- **Safety features protect against destructive commands** (Early): The `-WhatIf` and `-Confirm` parameters let you preview or confirm actions before executing them, essential when using wildcards and pipelines that could affect many objects at once.
- **Discovery is built into the shell** (Early): `Get-Command`, `Get-Help`, and `Get-Member` let you explore what's available without leaving the prompt—making self-learning and troubleshooting much faster than searching documentation.
- **PowerShell bridges multiple Windows technologies** (Middle): You can work with XML, WMI/CIM, Active Directory, and COM objects using the same syntax, eliminating the need to learn separate tools for each technology.
- **The provider model treats non-filesystem data as files** (Middle): Navigating the certificate store with `Set-Location cert:\CurrentUser\Root` shows how PowerShell unifies data stores—a pattern that extends to registry, environment variables, and more.
---
## 【Reading Tips】
- **Skim the opening tour if you're experienced**: Chapters 1–2 (roughly 0–34%) are a guided introduction. If you already use PowerShell daily, jump ahead to the reference sections; if you're new, read this part carefully—it builds the mental model for everything else.
- **Deep-read the object and pipeline sections**: The material on objects, properties, methods, and pipelines (around 19–28%) is the conceptual core. Master this and the rest of the book becomes much easier to apply.
- **Use the discovery commands as you read**: Don't just read about `Get-Command`, `Get-Help`, and `Get-Member`—run them. The book explicitly encourages ad hoc learning, and these commands are your best teachers.
- **Treat this as a reference, not a tutorial**: The book is designed for quick lookup on the job. Bookmark the sections you use most (regex, formatting, WMI) and return to them as needed rather than reading cover-to-cover.
- **Watch for safety examples**: The `-WhatIf` examples are instructive but dangerous if tried literally. Pay attention to the author's warnings—some commands can stop critical processes or force shutdowns.
---
## 【Coverage Limits】
This guide covers the book's opening tour and early reference material (approximately the first 53% of the book). The excerpts do not cover the later reference chapters on regular expressions, XPath, .NET string/DateTime formatting, WMI classes, COM objects, or the standard PowerShell verbs table—these are listed in the table of contents but not detailed in the sampled content.
---
##
Excerpt 1
m/catalog/errata.csp?isbn=9781098101671 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. PowerShell Pocket Reference...
dlet takes a process name as its first positional parameter. This parameter even supports wildcards: PS > gps l*s Deep Integration of Objects PowerShell begi...
unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require...
\filename. extension} Variable “Get and Set Content” syntax. This is similar to the arbitrary variable name syntax. If the name corresponds to a valid PowerS...
ists Array Definitions PowerShell arrays hold lists of data. The @() ( array cast ) syntax tells PowerShell to treat the contents between the parentheses as...
$rightValue When used with numbers, returns their quotient. This operator does not apply to strings, arrays, or hashtables. When used with any other type, Po...
ch Split on regular expressions. This option is the default. CultureInvariant Does not use culture-specific capitalization rules when doing a case-insensitiv...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Loading comments...
Reply to Comment
Edit Comment