Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Windows PowerShell Scripting

You're reading from   Mastering Windows PowerShell Scripting Automate and manage your environment using PowerShell Core 6.0

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781789536669
Length 626 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Chris Dent Chris Dent
Author Profile Icon Chris Dent
Chris Dent
Arrow right icon
View More author details
Toc

Table of Contents (27) Chapters Close

Preface 1. Section 1: Exploring PowerShell Fundamentals FREE CHAPTER
2. Introduction to PowerShell 3. Modules and Snap-ins 4. Working with Objects in PowerShell 5. Operators 6. Section 2: Working with Data
7. Variables, Arrays, and Hashtables 8. Branching and Looping 9. Working with .NET 10. Strings, Numbers, and Dates 11. Regular Expressions 12. Files, Folders, and the Registry 13. Windows Management Instrumentation 14. HTML, XML, and JSON 15. Web Requests and Web Services 16. Section 3: Automating with PowerShell
17. Remoting and Remote Management 18. Asynchronous Processing 19. Section 4: Extending PowerShell
20. Scripts, Functions, and Filters 21. Parameters, Validation, and Dynamic Parameters 22. Classes and Enumerations 23. Building Modules 24. Testing 25. Error Handling 26. Other Books You May Enjoy

What this book covers

Chapter 1, Introduction to PowerShell, offers a brief introduction to some of the most important parts of PowerShell. Including the help subsystem, command naming, providers, and splatting.

Chapter 2, Modules and Snap-Ins, explores the use of modules in PowerShell and PowerShell Core, followed by a brief look at snap-ins in Windows PowerShell.

Chapter 3, Working with Objects in PowerShell, explores the different commands available to interact with objects. These utility commands are used again and again.

Chapter 4, Operators, takes a look at the different operators available in PowerShell. Operators are a fundamental part of life in PowerShell.

Chapter 5, Variables, Arrays, and Hashtables, takes a deep dive into the use of variables within PowerShell, including concepts such as variable scope.

Chapter 6, Branching and Looping, explores different loop operators, such as foreach, for, while, and do.

Chapter 7, Working with .NET, focuses on what .NET means to PowerShell and takes a look at type accelerators and the new using keyword.

Chapter 8, Strings, Numbers, and Dates, explores working with some of the most common datatypes in PowerShell.

Chapter 9, Regular Expressions, takes a look at the use of regular expressions in PowerShell with a number of detailed examples.

Chapter 10, Files, Folders, and the Registry, explains that working with the filesystem is an important part of any scripting language. The registry has long been a core part of the Microsoft operating system. This chapter takes a look at the commands used to interact with both the filesystem and the registry.

Chapter 11, Windows Management Instrumentation, explains that when there are no specific commands, WMI is often the first stop. This chapter explores the commands used to interact with WMI.

Chapter 12, HTML, XML, and JSON, are common text-based formats that must be either generated or interrogated using PowerShell. This chapter looks at some of the methods available and a number of the common pitfalls.

Chapter 13, Web Requests and Web Services, explains that the last 5 years has seen the use of web services, particularly REST, soar. This chapter takes a good look at working with REST, using GitHub as a reference site. SOAP is explored in Windows PowerShell using a custom-built site.

Chapter 14, Remoting and Remote Management, covers PowerShell remoting, which is an import tool stretching PowerShell out from a local machine. The introduction of PowerShell Core adds the ability to use PowerShell remoting to Mac and Linux machines.

Chapter 15, Asynchronous Processing, starts off with a brief exploration of jobs before taking a look at events and, finally, Runspace Pools.

Chapter 16, Scripts, Functions, and Filters, covers the building blocks of larger scripts and modules. This chapter explores the structure of scripts and functions and the use of named blocks in relation to the pipeline.

Chapter 17, Parameters, Validation, and Dynamic Parameters, explores the param block in PowerShell. The param block is incredibly versatile, allowing immediately input validation, and offering features such as argument completion.

Chapter 18, Classes and Enumerations, explores classes in PowerShell and showcases a few possible uses of classes, including parameter validation, argument transformation, and class-based DSC resources.

Chapter 19, Building Modules, explains that a module draws together groups of functions into a single unit. This chapter also explores differences in structure and requirements between development and runtime.

Chapter 20, Testing, explores static analysis and unit testing using Pester. Testing requires a great deal of practice but can be used to offer confidence that a script or function behaves they way it was intended to.

Chapter 21, Error Handling, explores the different types of errors in PowerShell and how they might be handled. This chapter includes the use of try, catch, finally, and trap.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image