Mastering PowerShell Scripting: Automate and manage your environment using PowerShell 7.1, 4th Edition
- Length: 788 pages
- Edition: 4
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2021-06-29
- ISBN-10: 1800206542
- ISBN-13: 9781800206540
- Sales Rank: #1063392 (See Top 100 Books)
Grasp advanced PowerShell 7.1 functionalities for effective automation of your environment
Key Features
- See PowerShell in action, from learning the fundamentals to creating classes, scripts, and modules
- Work with dual code for PowerShell 7 and Windows PowerShell
- Automate complex tasks, manipulate data, and secure your environment
Book Description
PowerShell scripts offer a convenient way to automate various tasks.
This comprehensive guide starts with the basics before moving on to advanced topics to help you become a PowerShell 7.1 expert. This extensively revised edition includes two new chapters on debugging and troubleshooting and creating GUIs. Learn the new features of PowerShell 7.1 by working with parameters, objects, and .NET classes from within PowerShell 7.1. As you work through the chapters, you’ll see how to efficiently manage substantial amounts of data and interact with other services using PowerShell 7.1. Make the most of PowerShell’s automation features, using different methods to parse data, manipulate regular expressions, and work with Windows Management Instrumentation (WMI). Advanced topics include asynchronous processing, desired state configuration, using more complex scripts and filters, debugging issues, and error-handling techniques.
By the end of this PowerShell book, you will be an expert in scripting with PowerShell 7.1.
What you will learn
- Optimize code with functions, switches, and looping structures
- Work with objects and operators to test and manipulate data
- Parse and manipulate different data types
- Create scripts and functions using PowerShell
- Use jobs, runspaces, and runspace pools to run code asynchronously
- Write .NET classes with ease within PowerShell
- Create and implement regular expressions in PowerShell scripts
- Make use of advanced techniques to define and restrict the behavior of parameters
Who this book is for
This book is aimed at beginners who want to understand the basics as well as experienced system administrators looking to extend their knowledge.
Prior knowledge of PowerShell is beneficial but not essential to get the most value from this book. Some familiarity with operating systems would be useful, but not essential.
Table of Contents
- Introduction to PowerShell
- Modules and Snap-Ins
- Working with Objects in PowerShell
- Operators
- Variables, Arrays, and Hashtables
- Conditional Statements and Loops
- Working with .NET
- Strings, Numbers, and Dates
- Regular Expressions
- Files, Folders, and the Registry
- Windows Management Instrumentation
- Working with HTML, XML, and JSON
- Web Requests and Web Services
- Remoting and Remote Management
- Asynchronous Processing
- Graphical User Interfaces
- Scripts, Functions, and Script Blocks
- Parameters, Validation, and Dynamic Parameters
- Classes and Enumerations
- Building Modules
- Testing
- Error Handling
- Debugging and Troubleshooting