Windows PowerShell Quick Reference

Book description

For years, support for scripting and command-line administration on the Windows platform has paled in comparison to the support offered by the Unix platform. Unix administrators enjoyed the immense power and productivity of their command shells, while Windows administrators watched in envy. Windows PowerShell, Microsoft's next-generation command shell and scripting language, changes this landscape completely. This Short Cut contains the essential reference material to help you get your work done-including the scripting language syntax, a regular-expression reference, useful .NET classes, and much more.

Table of contents

  1. Windows PowerShell Quick Reference
    1. Preface
    2. 1. Windows PowerShell Quick Reference
      1. Getting Started
      2. Common Customization Points
        1. Console Settings
          1. Adjust your window size
          2. Make text selection easier
          3. Use hotkeys to operate the shell more efficiently
        2. Profiles
        3. Prompts
        4. Tab Completion
      3. Commands and Expressions
      4. Comments
      5. Variables
      6. Booleans
      7. Strings
        1. Literal and Expanding Strings
        2. Here Strings
        3. Escape Sequences
      8. Numbers
        1. Simple Assignment
        2. Administrative Numeric Constants
        3. Hexadecimal and Other Number Bases
      9. Arrays and Lists
        1. Array Definitions
        2. Array Access
        3. Array Slicing
      10. Hashtables (Associative Arrays)
        1. Hashtable Definitions
        2. Hashtable Access
      11. XML
      12. Simple Operators
        1. Arithmetic Operators
        2. Logical Operators
        3. Binary Operators
        4. Other Operators
      13. Comparison Operators
      14. Conditional Statements
        1. if, elseIf, and else Statements
        2. switch Statements
      15. Looping Statements
        1. for Statement
        2. foreach Statement
        3. while Statement
        4. do ... while Statement/do ... until Statement
        5. Flow Control Statements
          1. break
          2. continue
      16. Working with the .NET Framework
        1. Static Methods
        2. Instance Methods
        3. Static Properties
          1. Instance Properties
        4. Learning About Types
        5. The Get-Member Cmdlet
          1. .NET framework documentation
        6. Type Shortcuts
        7. Creating Instances of Types
        8. Interacting with COM Objects
        9. Extending Types
          1. The Add-Member cmdlet
          2. Custom type extension files
      17. Writing Scripts, Reusing Functionality
        1. Writing Scripts
        2. Running Scripts
          1. Invoking
          2. Dot-sourcing
        3. Providing Input to Scripts
          1. Argument array
          2. Formal parameters
          3. Pipeline input
          4. Cmdlet keywords in scripts
          5. $MyInvocation automatic variable
        4. Retrieving Output from Scripts
          1. Pipeline output
          2. Return statement
          3. Exit statement
        5. Functions
        6. Script Blocks
      18. Managing Errors
        1. Nonterminating Errors
        2. Terminating Errors
      19. Formatting Output
        1. Custom formatting files
      20. Capturing Output
      21. Tracing and Debugging
        1. The Set-PsDebug Cmdlet
        2. The Trace-Command Cmdlet
        3. Verbose Cmdlet Output
      22. Appendices
        1. Regular Expression Reference
      23. PowerShell Automatic Variables
      24. Selected .NET Classes, and Their Uses
      25. WMI Reference
      26. Selected COM Objects, and Their Uses
      27. .NET String Formatting
        1. String Formatting Syntax
        2. Standard Numeric Format Strings
        3. Custom Numeric Format Strings
        4. Standard DateTime Format Strings
        5. Custom DateTime Format Strings
      28. Standard PowerShell Verbs
      29. Index
      30. Copyright
    3. About the Author

Product information

  • Title: Windows PowerShell Quick Reference
  • Author(s): Lee Holmes
  • Release date: September 2006
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 0596528132