
Premium
Title Page
1/3/2026
Copyright
1/3/2026
Dedication
1/3/2026
About the Author
1/3/2026
Acknowledgement
1/3/2026
Preface
1/3/2026
Chapter 1: Getting Started with PowerShell
1/3/2026
1.1 Introduction to the PowerShell Ecosystem
1/3/2026
1.1.1 What Makes PowerShell Different
1/3/2026
1.1.2 The Two Editions
1/3/2026
1.2 Installing PowerShell Across Platforms
1/3/2026
1.2.1 Windows
1/3/2026
1.2.2 macOS
1/3/2026
1.2.3 Linux - Debian / Ubuntu
1/3/2026
1.2.4 Linux - Red Hat / Fedora / Rocky
1/3/2026
1.2.5 Verifying the Installation
1/3/2026
1.3 Understanding PowerShell Versions
1/3/2026
1.3.1 Major Milestones
1/3/2026
1.3.2 Which Version Should You Target?
1/3/2026
1.4 Navigating the Console, ISE, and VS Code
1/3/2026
1.4.1 The Terminal
1/3/2026
1.4.2 The Windows PowerShell ISE
1/3/2026
1.4.3 Visual Studio Code + PowerShell Extension
1/3/2026
1.5 First Commands and the Help System
1/3/2026
1.5.1 Your First Five Commands
1/3/2026
1.5.2 Aliases: Short Names, Long Commands
1/3/2026
1.5.3 The Help System
1/3/2026
1.5.4 Discovering Objects with Get-Member
1/3/2026
1.6 Understanding the Pipeline
1/3/2026
1.6.1 A Simple Pipeline, Step by Step
1/3/2026
1.6.2 How Objects Flow
1/3/2026
1.6.3 Piping Strings, Numbers, and Files
1/3/2026
1.6.4 Chapter Summary
1/3/2026
Chapter 2: Understanding Types, Variables, and Objects
1/3/2026
2.1 The Object-Oriented Nature of PowerShell
1/3/2026
2.1.1 Everything Is an Object - Even Numbers
1/3/2026
2.1.2 Methods and Properties
1/3/2026
2.2 Working with Types and Type Accelerators
1/3/2026
2.2.1 Type Literals and Casting
1/3/2026
2.2.2 Static Methods and Properties
1/3/2026
2.2.3 Type Accelerators
1/3/2026
2.3 Variables and Scope
1/3/2026
2.3.1 Declaring and Assigning
1/3/2026
2.3.2 Variable Naming Rules
1/3/2026
2.3.3 Scope
1/3/2026
2.3.4 Useful Built-In Variables
1/3/2026
2.4 Collections, Arrays, and Hash Tables
1/3/2026
2.4.1 Arrays
1/3/2026
2.4.2 Generic Lists for Growable Data
1/3/2026
2.4.3 Hash Tables
1/3/2026
2.4.4 Ordered Dictionaries
1/3/2026
2.4.5 PSCustomObject: Lightweight Records
1/3/2026
2.5 Object Formatting and Output
1/3/2026
2.5.1 The Five Format Cmdlets
1/3/2026
2.5.2 A Key Rule: Format Last
1/3/2026
2.5.3 Writing to the Host, Output Stream, and Beyond
1/3/2026
2.5.4 Write-Output vs Write-Host
1/3/2026
2.5.5 Exporting and Persisting Objects
1/3/2026
2.5.6 Chapter Summary
1/3/2026
Chapter 3: Operators and Expressions
1/3/2026
3.1 A Map of PowerShell's Operators
1/3/2026
3.2 Arithmetic Operators
1/3/2026
3.2.1 Numbers
1/3/2026
3.2.2 Strings
1/3/2026
3.2.3 Arrays and Collections
1/3/2026
3.2.4 Dates and Time Spans
1/3/2026
3.3 Comparison Operators
1/3/2026
3.3.1 Equality and Ordering
1/3/2026
3.3.2 Wildcards with -like
1/3/2026
3.3.3 Array Membership: -contains and -in
1/3/2026
3.4 Logical and Bitwise Operators
1/3/2026
3.4.1 Truthiness Rules
1/3/2026
3.4.2 Bitwise Operators
1/3/2026
3.5 Assignment Operators
1/3/2026
3.6 String and Regular Expression Operators
1/3/2026
3.6.1 -match and $Matches
1/3/2026
3.6.2 -replace
1/3/2026
3.6.3 -split and -join
1/3/2026
3.6.4 The Format Operator -f
1/3/2026
3.7 Type Operators
1/3/2026
3.8 Expression Evaluation and Precedence
1/3/2026
3.8.1 When Precedence Bites
1/3/2026
3.8.2 Sub-expressions: $(...) and @(...)
1/3/2026
3.9 Operators That Feed the Pipeline
1/3/2026
3.9.1 The Range Operator ..
1/3/2026
3.9.2 The Call Operator &
1/3/2026
3.9.3 Null-Coalescing and Null-Conditional (PowerShell 7)
1/3/2026
3.10 Putting Operators to Work in Pipelines
1/3/2026
3.10.1 Example: Filtering and Summarizing Processes
1/3/2026
3.10.2 Example: Parsing a Log Line
1/3/2026
3.10.3 Example: A Mini Report Generator
1/3/2026
3.10.4 Chapter Summary
1/3/2026
Chapter 4: Advanced Variables and Data Handling
1/3/2026
4.1 Automatic Variables
1/3/2026
4.1.1 Practical Uses of $PSScriptRoot and $MyInvocation
1/3/2026
4.1.2 Cross-Platform Branching
1/3/2026
4.2 Preference Variables
1/3/2026
4.2.1 The Four Standard Values
1/3/2026
4.2.2 Per-Call Overrides
1/3/2026
4.2.3 The Full Preference Catalog
1/3/2026
4.3 Environment Variables
1/3/2026
4.3.1 Persisting Environment Changes
1/3/2026
4.3.2 Common Variables by Platform
1/3/2026
4.4 Secure Strings and Credentials
1/3/2026
4.4.1 Creating a SecureString Interactively
1/3/2026
4.4.2 The PSCredential Object
1/3/2026
4.4.3 Saving and Reloading Credentials
1/3/2026
4.4.4 SecretManagement - The Modern Pattern
1/3/2026
4.5 Data Serialization - JSON, XML, CSV, CLIXML
1/3/2026
4.5.1 JSON with ConvertTo-Json and ConvertFrom-Json
1/3/2026
4.5.2 CSV with Export-Csv and Import-Csv
1/3/2026
4.5.3 CLIXML for Full-Fidelity Round-Tripping
1/3/2026
4.5.4 XML with System.Xml and Select-Xml
1/3/2026
4.6 Advanced Data Manipulation
1/3/2026
4.6.1 Grouping with Group-Object
1/3/2026
4.6.2 Aggregating with Measure-Object
1/3/2026
4.6.3 Projection with Select-Object and Calculated Properties
1/3/2026
4.6.4 Joining Two Streams
1/3/2026
4.6.5 Filtering and Paging Large Inputs
1/3/2026
4.7 A Complete Mini-Project
1/3/2026
4.7.1 Chapter Summary
1/3/2026
Chapter 5: Flow Control and Script Logic
1/3/2026
5.1 From Expressions to Programs
1/3/2026
5.2 Conditional Statements
1/3/2026
5.2.1 if, elseif, and else
1/3/2026
5.2.2 The Ternary Operator (PowerShell 7+)
1/3/2026
5.2.3 The switch Statement
1/3/2026
5.2.4 Regex and Wildcard Modes
1/3/2026
5.2.5 The -File Mode: Streaming Line-by-Line
1/3/2026
5.3 Loops
1/3/2026
5.3.1 The for Loop
1/3/2026
5.3.2 The foreach Statement
1/3/2026
5.3.3 ForEach-Object in the Pipeline
1/3/2026
5.3.4 while and do/while/until
1/3/2026
5.3.5 Loop Control: break, continue, and Labels
1/3/2026
5.3.6 Parallel Iteration with ForEach-Object -Parallel
1/3/2026
5.4 Error Handling Basics
1/3/2026
5.4.1 try / catch / finally
1/3/2026
5.4.2 Catching Specific Exceptions
1/3/2026
5.4.3 Throwing Your Own Errors
1/3/2026
5.4.4 The $ErrorActionPreference Spectrum
1/3/2026
5.5 Script Structuring Best Practices
1/3/2026
5.5.1 The Top-of-File Contract
1/3/2026
5.5.2 Layered Structure
1/3/2026
5.5.3 Writing Idempotent Scripts
1/3/2026
5.5.4 ShouldProcess for Destructive Actions
1/3/2026
5.5.5 Exit Codes and Script Termination
1/3/2026
5.6 A Complete Worked Example
1/3/2026
5.6.1 Chapter Summary
1/3/2026
Chapter 6: Functions and Script Design
1/3/2026
6.1 Why Functions?
1/3/2026
6.2 Creating Basic Functions
1/3/2026
6.2.1 Naming Conventions: Verb-Noun
1/3/2026
6.2.2 Anatomy of a Function
1/3/2026
6.3.1 Positional Parameters
1/3/2026
6.3.2 Typed Parameters
1/3/2026
6.3.3 Default Values
1/3/2026
6.3.4 Switch Parameters
1/3/2026
6.4 Parameter Validation
1/3/2026
6.4.1 [Parameter()] Modifiers
1/3/2026
6.5 Return Values and Output Handling
1/3/2026
6.5.1 The Implicit Output Stream
1/3/2026
6.5.2 Suppressing Unwanted Output
1/3/2026
6.5.3 Verbose, Warning, and Debug Output
1/3/2026
6.6 Script Modularization
1/3/2026
6.6.1 Dot-Sourcing
1/3/2026
6.6.2 Simple Script Modules (.psm1)
1/3/2026
6.6.3 The $PSScriptRoot Pattern
1/3/2026
6.7 Writing Functions Other People Want to Use
1/3/2026
6.7.1 Do One Thing Well
1/3/2026
6.7.2 Emit Objects, Not Strings
1/3/2026
6.7.3 Comment-Based Help
1/3/2026
6.7.4 A Checklist for Production Functions
1/3/2026
6.8 A Complete Example
1/3/2026
6.8.1 Chapter Summary
1/3/2026
Chapter 7: Advanced Functions and Module Development
1/3/2026
7.1 What Makes a Function Advanced?
1/3/2026
7.2 [CmdletBinding()] - The Upgrade Switch
1/3/2026
7.2.1 The [CmdletBinding()] Modifiers
1/3/2026
7.2.2 The $PSCmdlet Automatic
1/3/2026
7.3 Pipeline Input Handling
1/3/2026
7.3.1 The begin / process / end Blocks
1/3/2026
7.3.2 ValueFromPipeline vs
1/3/2026
ValueFromPipelineByPropertyName
1/3/2026
7.3.3 Putting It Together - a Proper Pipeline Function
1/3/2026
7.4 The Full Parameter Attribute Catalog
1/3/2026
7.4.1 Aliases in Practice
1/3/2026
7.4.2 Custom Tab Completion
1/3/2026
7.5 Creating and Using Modules
1/3/2026
7.5.1 Anatomy of a Script Module (.psm1)
1/3/2026
7.5.2 Installing and Importing
1/3/2026
7.5.3 Module Scope and $script:
1/3/2026
7.6 Script Modules vs Binary Modules
1/3/2026
7.6.1 What a Binary Cmdlet Looks Like
1/3/2026
7.6.2 When to Choose Which
1/3/2026
7.7 Best Practices for Module Design
1/3/2026
7.7.1 One Function per File
1/3/2026
7.7.2 Don't Emit Write-Host
1/3/2026
7.7.3 Prefix Unapproved Verbs (or Pick Approved Ones)
1/3/2026
7.7.4 Write Tests
1/3/2026