Leverage PowerShell 7 to write code on Windows, Linux, and Raspberry Pi to accomplish real-world tasks with this practical guide
Key Features- Master the art of coding with Microsoft's free, open-source cross-platform language
- Understand essential programming concepts such as loops and objects through 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
Discover the capabilities of PowerShell 7 for your everyday tasks with this carefully paced tutorial that will help you master this versatile programming language.
The first set of chapters will show you where to find and how to install the latest version of PowerShell, providing insights into the distinctive features that set PowerShell apart from other languages. You'll then learn essential programming concepts such as variables and control flow, progressing to their applications. As you advance, you'll work with files and APIs, writing scripts, functions, and modules. You'll also gain proficiency in securing your PowerShell environment before venturing into different operating systems.
Enriched with detailed practical examples tailored for Windows, Linux, macOS, and Raspberry Pi, each chapter weaves real-world scenarios to ignite your imagination and cement the principles you learn. You'll be able to reinforce your understanding through self-assessment questions and delve deeper into the principles using comprehensive reading lists.
By the end of this book, you'll have the confidence to use PowerShell for physical computing and writing scripts for Windows administration.
What you will learn- Grasp the distinctive object-oriented nature of PowerShell 7
- Explore the practical applications of standard programming concepts, such as control flow
- Find out how to interact with websites and APIs
- Implement best practices to secure your PowerShell environment and write secure code
- Get to grips with writing scripts, functions, and modules
- Develop the skills to troubleshoot your code
- Deploy PowerShell on various operating systems
This book uses everyday language to explain concepts and has simple examples to explain complex principles. It is suitable for early careers IT professionals, architects, system engineers, secondary school pupils and university students, who are interested in learning this powerful language.
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