Leverage PowerShell 7 to write code on Windows, Linux, and Raspberry Pi to accomplish useful tasks in the real world
Key Features
- Learn how to write code using Microsoft’s free, open-source cross-platform language
- Understand programming concepts like loops and objects with lots of practical examples
- Practice using PowerShell 7 with websites, APIs and physical computing devices like Raspberry Pi
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
This book is a comprehensive guide to PowerShell 7; a carefully paced tutorial that will guide you towards proficiency in this versatile programming language.
In the first set of chapters, you’ll find out how to find and install the latest version and what makes PowerShell different from other languages. As you progress, you’ll move on to learning how to apply basic programming concepts like variables and control flow, how to work with files and APIs, write scripts, functions and modules, and how to secure a PowerShell environment before working with different operating systems.
Each chapter is full of useful examples that have been written to work with Windows, Linux, macOS, and Raspberry Pi, which will capture your imagination and cement the principles that are being taught. You’ll also practice your newfound knowledgewith plenty of self-assessment questions and benefit from comprehensive reading lists that cover the principles being taught in depth.
By the end of this book, you will be both comfortable using PowerShell for physical computing and writing scripts for Windows administration.
What you will learn
- Understand how the object-oriented nature of PowerShell 7 makes it different
- Explore the application of standard programming concepts like control flow
- Find out how to interact with websites and APIs
- Leverage best practices to secure your PowerShell environment, and write secure code
- Get to grips with writing scripts, functions, and modules
- Find out how to troubleshoot your code with ease
- Deploy PowerShell on different operating systems
Who this book is for
This book is for system administrators, PowerShell developers, and cloud and DevOps engineers who are interested in gaining in-depth knowledge about PowerShell 7 and discovering what they can do with PowerShell in their daily work. Anyone else getting started with PowerShell will also find plenty of useful information in this book. Familiarity with at least one programming language will help you follow along more easily.
Table of Contents
- Introduction to PowerShell 7 – What It Is and How to Get It
- Exploring PowerShell Cmdlets and Syntax
- The PowerShell Pipeline – How to String Cmdlets Together
- PowerShell Variables and Data Structures
- PowerShell Control Flow – Conditionals and Loops
- PowerShell and Files – Reading, Writing, and Manipulating Data
- PowerShell and the Web – HTTP, REST, and JSON
- Writing Our First Script – Turning Simple Cmdlets into Reusable Code
- Don't Repeat Yourself – Functions and Scriptblocks
- Error Handling – Oh No! It's Gone Wrong!
- Creating Our First Module
- Securing PowerShell
- Working With PowerShell 7 and Windows
- PowerShell 7 for Linux and macOS
- PowerShell 7 and the Raspberry Pi
- Working with PowerShell and .NET
Nick Parlow is a Fujitsu Fellow and has been an email specialist for the last 20 years. He's a Microsoft Certified Master in Exchange, a VMware Certified Advanced Professional, and a Microsoft Certified Trainer. He's got master's degrees in network engineering from Sheffield Hallam and software engineering from Northumbria. Best of all, he's a Raspberry Pi Certified Educator. Before IT, he worked as a metallurgist, including at the Joint European Torus, and also worked as a deckhand and a tree surgeon's mate. It's all good. He works with schools in Hertfordshire, teaching programming and physical computing. In his spare time, he likes to play with chainsaws, watch Welsh rugby, listen to punk music, and drink cider.