PowerShell Pocket Reference, 3rd Edition

Book description

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

Publisher resources

View/Submit Errata

Table of contents

  1. A Guided Tour of PowerShell
    1. Introduction
    2. An Interactive Shell
    3. Structured Commands (Cmdlets)
    4. Deep Integration of Objects
    5. Administrators as First-Class Users
    6. Composable Commands
    7. Techniques to Protect You from Yourself
    8. Common Discovery Commands
    9. Ubiquitous Scripting
    10. Ad Hoc Development
    11. Bridging Technologies
    12. Namespace Navigation Through Providers
    13. Much, Much More
    14. Conventions Used in This Book
    15. Using Code Examples
    16. O’Reilly Online Learning
    17. How to Contact Us
  2. 1. PowerShell Language and Environment
    1. Commands and Expressions
    2. Comments
    3. Help Comments
    4. Variables
    5. Booleans
    6. Strings
      1. Literal and Expanding Strings
      2. Here Strings
      3. Escape Sequences
    7. Numbers
      1. Simple Assignment
      2. Administrative Numeric Constants
      3. Hexadecimal and Other Number Bases
      4. Large Numbers
      5. Imaginary and Complex Numbers
    8. Arrays and Lists
      1. Array Definitions
      2. Array Access
      3. Array Slicing
    9. Hashtables (Associative Arrays)
      1. Hashtable Definitions
      2. Hashtable Access
    10. XML
    11. Simple Operators
      1. Arithmetic Operators
      2. Logical Operators
      3. Binary Operators
      4. Other Operators
    12. Comparison Operators
    13. Conditional Statements
      1. if, elseif, and else Statements
      2. Ternary Operators
      3. Null Coalescing and Assignment Operators
      4. switch Statements
    14. Looping Statements
      1. for Statement
      2. foreach Statement
      3. while Statement
      4. do … while Statement/do … until Statement
      5. Flow Control Statements
      6. Classes
      7. Custom Enumerations
      8. Workflow-Specific Statements
    15. Working with the .NET Framework
      1. Static Methods
      2. Instance Methods
      3. Explicitly Implemented Interface Methods
      4. Static Properties
      5. Instance Properties
      6. Learning About Types
      7. Type Shortcuts
      8. Creating Instances of Types
      9. Interacting with COM Objects
      10. Extending Types
    16. Writing Scripts, Reusing Functionality
      1. Writing Commands
      2. Running Commands
      3. Providing Input to Commands
      4. Retrieving Output from Commands
    17. Managing Errors
      1. Nonterminating Errors
      2. Terminating Errors
    18. Formatting Output
      1. Custom Formatting Files
    19. Capturing Output
    20. Common Customization Points
      1. Console Settings
      2. Profiles
      3. Prompts
      4. Tab Completion
      5. User Input
      6. Command Resolution
  3. 2. Regular Expression Reference
  4. 3. XPath Quick Reference
  5. 4. .NET String Formatting
    1. String Formatting Syntax
    2. Standard Numeric Format Strings
    3. Custom Numeric Format Strings
  6. 5. .NET DateTime Formatting
    1. Custom DateTime Format Strings
  7. 6. Selected .NET Classes and Their Uses
  8. 7. WMI Reference
  9. 8. Selected COM Objects and Their Uses
  10. 9. Selected Events and Their Uses
    1. Generic WMI Events
  11. 10. Standard PowerShell Verbs
  12. Index

Product information

  • Title: PowerShell Pocket Reference, 3rd Edition
  • Author(s): Lee Holmes
  • Release date: April 2021
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098101671