Skip to Main Content
Learn PowerShell Scripting in a Month of Lunches
book

Learn PowerShell Scripting in a Month of Lunches

by Jeffery Hicks, Don Jones
December 2017
Beginner content levelBeginner
352 pages
10h 31m
English
Manning Publications
Content preview from Learn PowerShell Scripting in a Month of Lunches

Chapter 8. Always design first

Before you sit down and start coding up a function or a class, you need to do some thinking about its design. We almost constantly see toolmaking newcomers start charging into their code, and before long they’ve made some monstrosity that’s harder to work with than it should be. In this chapter, we’re going to lay out some of the core PowerShell tool design principles, to help you stay on the path of Toolmaking Righteousness. To be clear, all we’re doing here is building on what we laid out in part 1 of this book. Now we’re ready to provide some more concrete examples.

8.1. Tools do one thing

As we’ve mentioned before, the Prime Directive for a PowerShell tool is that it does one thing. You can see this in almost ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Windows PowerShell in a Month of Lunches, Third Edition

Learn Windows PowerShell in a Month of Lunches, Third Edition

Don Jones

Publisher Resources

ISBN: 9781617295096Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link