Write and Execute PowerShell Scripts
In this lab, you'll dive into core PowerShell scripting capabilities. You will focus on creating variables and arrays using PowerShell, a fundamental step in managing data. You will then manipulate the data, and will understand the versatility of text handling in PowerShell. You will then design PowerShell scripts to perform various tasks. When finished, you’ll have the skills to write basic PowerShell scripts.
Terms and conditions apply.
Lab info
Lab author
Challenge
Getting Started in the Lab Environment
Here are the initial instructions and explanation of the lab environment. Read this while your environment is busy creating itself from nothing. Yes, this violates physics; we know. How fun!
Challenge
Using Arrays within PowerShell
You will start this lab by learning about variables, arrays, and hashtables.
Challenge
Manipulating Data using PowerShell
For this challenge, you'll learn how to work with JSON, XML, and CSV data, manipulating it further using loops and other PowerShell commands.
Challenge
Creating PowerShell Scripts
To finish up this lab, you will create a script to get system information, and will practice what you learned previously, manipulating real-world external data in a second script.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.
Recommended prerequisites
- Windows Server 2022. Similar, for this lab, to Windows Client (Windows 10/11)
- Windows PowerShell