Featured resource
pluralsight tech forecast
2025 Tech Forecast

Which technologies will dominate in 2025? And what skills do you need to keep up?

Check it out
Hamburger Icon
  • Labs icon Lab
  • Core Tech
Google Cloud Platform icon
Labs

Build a Windows Server Inventory Tool with PowerShell

In this lab, you'll practice building a comprehensive server inventory tool using PowerShell. You'll have a script to inventory a Windows server when you finish.

Google Cloud Platform icon
Labs

Path Info

Rating
(12 reviews)
Level
Clock icon Beginner
Duration
Clock icon 1h 30m
Published
Clock icon Sep 19, 2024

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

    Understand CIM and How to Interact with It

    This lab is going to focus heavily on WMI or CIM. WMI (Microsoft’s version of CIM) is a management framework that exposes thousands of informational attributes about a Windows system. This challenge will encourage you to explore CIM and see what you can do with it.

    In this short, introductory challenge, you will learn which PowerShell cmdlets can query information about a Windows system from CIM.

    You’ll learn some CIM basics by observing the output PowerShell returns, and catch a few tips to discover new ways to explore a Windows system.

  3. Challenge

    Query Disk Space

    The tool you’ll build in this lab will have many different functions.

    This challenge will kick off the real work of building a server inventory tool and use PowerShell to discover disk space information. You will use the Get-CimInstance cmdlet to query CIM on the local Windows system.

  4. Challenge

    Retrieve RAM and CPU Details

    In this challenge, you'll dive into querying crucial hardware information from a Windows system. You'll learn how to use PowerShell to retrieve details about the total memory, CPU type, and CPU speed. This knowledge is vital in understanding your system's capabilities and performance.

  5. Challenge

    Query Operating System Information

    In this short challenge, you'll explore how to query vital operating system information from a Windows system. You'll learn how to use PowerShell and WMI to retrieve key details such as the OS version, service pack level, architecture, and last boot time.

  6. Challenge

    Query Windows Services

    In this challenge, you will delve into querying Windows services using PowerShell. You'll eventually learn how to retrieve details such as the status, start type, and display name of services to add them to your server inventory report.

  7. Challenge

    Build the Tool Script

    As of now, you have done all of the hard work. You’ve discovered all the commands to query the information you're after. You’ve saved the rough commands into a script, but the script is far from done.

    In this challenge, it’s time to refactor the script so it can all run as a single unit, can return the reporting output you’re after, and will be scalable.

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.

What's a lab?

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.

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.