Build a Bandwidth Monitoring Tool with iPerf and PowerShell
In this lab, you'll practice creating a bandwidth monitoring tool using iPerf and PowerShell. When you’re finished, you’ll have a PowerShell module capable of deploying iPerf and retrieving statistics.
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
Set up iPerf and Test it Out
In this challenge, you'll be stepping through the process of setting up the iPerf tool to monitor bandwidth. You'll get hands-on practice with PowerShell Remoting, copying files to a remote server, running a quick test with iPerf, and cleaning up afterward. By the end of this challenge, you'll have a working iPerf instance running on the remote server, allowing you to understand how to perform real-time network bandwidth measurements.
Challenge
Run a Bandwidth Check w/PowerShell
Now that you’ve gotten a taste of what iPerf is and how to use it, you’ll begin integrating PowerShell into the mix. In this challenge, you will begin “wrapping” PowerShell around iPerf to invoke a bandwidth test.
Challenge
Build Server Check Functionality
When thinking of automating iPerf bandwidth tests, it’s important to build “conditional code.” This is the kind of code that checks the status of processes to make intelligent decisions as to what to do next. For this tool, you must build functionality to test whether or not iPerf is running on a remote server.
Challenge
Parse Out a Single Bandwidth Number
You’ve been invoking bandwidth tests and inspecting the results throughout this lab. But those results are just a big string of unstructured data. To build a PowerShell tool (especially a wrapper tool like this one), you should always focus on converting the unstructured data that CLI commands give you into easily consumable output.
Challenge
Build a Comprehensive PowerShell Module
Now it’s time to wrap all of this hard work up with a nice bow, and build a nice PowerShell module from it.
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
- An intermediate to advanced knowledge of PowerShell and Windows
- An understanding of PowerShell modules and how to build a basic function
- Familiarity with VS Code and using it for PowerShell development
- Optional familiarity with the iPerf bandwidth testing tool