Skip to main content
Apress

Building Better PowerShell Code

Applying Proven Practices One Tip at a Time

  • Book
  • © 2020

Overview

  • Discusses building better PowerShell code using best practices
  • Covers dozens of different tips and tricks to write better PowerShell code
  • Written by a six-time MVP

This is a preview of subscription content, log in via an institution to check access.

Access this book

eBook USD 16.99 USD 39.99
Discount applied Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 16.99 USD 54.99
Discount applied Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

Licence this eBook for your library

Institutional subscriptions

Table of contents (20 chapters)

Keywords

About this book

Learn to write better PowerShell code via short, example-driven tips. This book covers tips to make your PowerShell scripts faster and easier to read all while following proven best practices. Written by a six-time Microsoft MVP and one of the first Microsoft PowerShell MVPs with over a decade of PowerShell experience, Building Better PowerShell Code gives you easily digestible tips you can begin using immediately. 

The book starts with an overview of some of the most important tips the author can muster which segues into a deeper dive with dozens of examples throughout the book.  It takes you through tips such as using community modules, writing better comments, thinking of PowerShell functions as building blocks, and more. You will also see how to use parameters the right way and how to create simple logging code to easily record script activity. 

You will learn not only how to write better code, but also how to implement some mindset tricks, such as being explicit and specific with code and how to write code that reads well. You’ll get into error handling and also how to make your scripts more secure. Finally, you’ll examine the concept of building PowerShell tools and how to build scripts for speed. 

Other tips and best practices include: 

  • Building Pester tests
  • Improving performance through parallel processing
  • Writing cross-platform scripts
  • Using filtering properly 

After reading this book and applying these tips, you will have an expert coding mindset and be able to build PowerShell code that’s efficient, readable, and compliant with many best practices. 

What You Will Learn

  • Implement error handling
  • Create a logging function
  • Use regular expressions to search strings
  • Implement parallel processing

Who This Book Is For

PowerShell script developers.



Authors and Affiliations

  • Evansville, USA

    Adam Bertram

About the author

Adam Bertram is a 20+ year veteran of IT and an experienced online business professional. He’s a consultant, Microsoft MVP, blogger, trainer, published author and content marketer for multiple technology companies.

Bibliographic Information

  • Book Title: Building Better PowerShell Code

  • Book Subtitle: Applying Proven Practices One Tip at a Time

  • Authors: Adam Bertram

  • DOI: https://doi.org/10.1007/978-1-4842-6388-4

  • Publisher: Apress Berkeley, CA

  • eBook Packages: Professional and Applied Computing, Apress Access Books, Professional and Applied Computing (R0)

  • Copyright Information: Adam Bertram 2020

  • Softcover ISBN: 978-1-4842-6387-7Published: 20 October 2020

  • eBook ISBN: 978-1-4842-6388-4Published: 19 October 2020

  • Edition Number: 1

  • Number of Pages: XVIII, 146

  • Number of Illustrations: 24 b/w illustrations

  • Topics: Microsoft and .NET

Publish with us