Automate complex tasks and processes with PowerShell scripts. This amazing book teaches you how to write, test, and organize high-quality, reusable scripts for Windows, Linux, and cloud-based systems.Learn PowerShell Scripting in a Month of Lunches, Second Edition takes you beyond command-line PowerShell and opens up the amazing world of scripting and automation. In just 27 bite-sized lessons, you’ll learn to write scripts that can eliminate repetitive manual tasks, create custom reusable tools, and build effective pipelines and workflows.In Learn PowerShell Scripting in a Month of Lunches, Second Edition you’ll learn:Setting up a reliable scripting environment Designing functions and scripts Effective pipeline usage Scripting and security Dealing with errors and bugs Source control with git Sharing and publishing scripts Professional-grade scripting practicesThe PowerShell language lets you write scripts to control nearly every aspect of Windows. Just master a few straightforward scripting skills, and you'll save yourself from hours of tedious tasks. This revised second edition is fully updated to PowerShell’s latest version, including hands-on examples that perfectly demonstrate modern PowerShell’s cross-platform applications.Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.About the technologyYou can write PowerShell scripts to automate nearly any admin task on Windows, Linux, and macOS. This book shows you how! In just 27 short lessons you can complete on your lunch break, you’ll learn to create, organize, test, and share scripts and tools that will save you hours of time in your daily work.About the bookLearn PowerShell Scripting in a Month of Lunches, Second Edition is a hands-on introduction to PowerShell automation and toolbuilding. Updated for the latest version of PowerShell, this thoroughly revised bestseller teaches you how to write efficient scripts, find and squash bugs, and organize your tools into libraries. Along the way, you’ll even pick up tips for securing and managing Linux and macOS systems.What's insideSetting up a reliable scripting environment Designing functions and scripts Effective pipeline usage Sharing and publishing scriptsAbout the readerBeginning to intermediate knowledge of PowerShell required.About the authorJames Petty is CEO of PowerShell.org and The DevOps Collective and a Microsoft MVP. Don Jones and Jeffery Hicks are the authors of the first edition of Learn PowerShell Scripting in a Month of Lunches.Table of ContentsPART 11 Before you begin2 Setting up your scripting environment3 WWPD: What would PowerShell do?4 Review: Parameter binding and the PowerShell pipeline5 Scripting language: A crash course6 The many forms of scripting (and which to choose)7 Scripts and securityPART 28 Always design first9 Avoiding bugs: Start with a command10 Building a basic function and script module11 Getting started with advanced functions12 Objects: The best kind of output13 Using all the streams14 Simple help: Making a comment15 Errors and how to deal with them16 Filling out a manifestPART 317 Changing your brain when it comes to scripting18 Professional-grade scripting19 An introduction to source control with Git20 Pestering your script21 Signing your script22 Publishing your scriptPART 423 Squashing bugs24 Enhancing script output presentation25 Wrapping up the .NET Framework26 Storing data—not in Excel!27 Never the end