Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Core Tech
Google Cloud Platform icon
Labs

Build a PowerShell Tool for Windows Event and Text Log Analysis

In this lab, you’ll practice building a PowerShell tool to analyze Windows event logs and text files. When you’re finished, you’ll have a functioning script to scan activity in a given timeframe.

Google Cloud Platform icon
Lab platform
Lab Info
Rating
(11)
Level
Beginner
Last updated
Aug 05, 2025
Duration
2h 0m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. 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!

  2. Challenge

    Brainstorm and Sketch Out a Tool

    You will start to create a PowerShell script to audit a server.

  3. Challenge

    Use Get-WinEvent to Query Window Event Logs

    Explore the full event logs, and then gradually apply filters to retrieve specific logs, understanding why filtering is crucial.

  4. Challenge

    Find Local Storage Volumes

    Learn how to filter local drives by root paths, and search recursively for specific file types within those drives.

  5. Challenge

    Search all Local Storage Volumes for Log Files

    Using Get-ChildItem, learn how to interrogate text log files on your local storage volumes.

  6. Challenge

    Add Script Parameters

    Make the tool more dynamic by creating a holistic script that runs together with parameters.

  7. Challenge

    Add CSV Output

    In this challenge, you will learn to export the records found into a CSV file, rather than just outputting them via the console. Saving to a CSV file will allow you to quickly parse and share the results of your script with others.

  8. Challenge

    Add Simple Error Handling

    In this final challenge, you will learn to incorporate basic error handling into your tool. You’ll learn about the $Error variable, non-terminating and terminating errors.

About the author

Adam Bertram is an independent consultant, technical writer, trainer, and presenter. Adam specializes in consulting and evangelizing all things IT automation, mainly focused around Windows PowerShell.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight