Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoshAdmin

This repository contains PowerShell challenges focused at Windows administration tasks rather than arbitrary coding tasks. These challenges don't test how well you can code, these challenges are all about if you can achieve the desired outcome. We're teaching you how to admin using PowerShell, not how to PowerShell specifically.

There are a couple of goals we have with PoshAdmin:

  • Have fun! We don't want this to be a chore.
  • Those that have little to no experience have a structured progression to learn real-life admin skills using PowerShell.
  • Those that are more advanced can affirm their skills and perhaps use this project to help train juniors on their teams.

Prerequisites

  • Hyper-V host. We require this so that AutomatedLab can run the VMs required for the challenges. We don't support doing these challenges on Azure at the moment. Please let us know if this is something you want though!

  • Install AutomatedLab. You can do this via the PowerShell gallery (Install-Module AutomatedLab) or via the MSI on the GitHub page. You must install this on your Hyper-V server if you are using Hyper-V.

      Install-Module AutomatedLab
    
  • ISO for Windows Server 2019 placed in the C:\LabSources\ISOs folder on the machine you're running AutomatedLab from. This folder won't exist unless you've already used AutomatedLab so feel free to go ahead and create it manually if it doesn't exist.

  • ISO for Exchange 2019 placed in the C:\LabSources\ISOs folder on the machine you're running AutomatedLab from. The link provided will take you to the CU9 for Exchange 2019 which is the latest as of writing.

  • ISO for SQL Server 2019 placed in the C:\LabSources\ISOs folder on the machine you're running AutomatedLab from. You will need to download the EXE file and then when you run the setup, you will have the option to download the ISO.

SQL media download

  • Pester module is required for us to check if you have completed the tasks. Pester is installed by default so you will need to force the newer version to be installed.

      Install-Module Pester -Force
    

Setup

  • Run the Deploy-<Environment><Level>.ps1 script form this repository on the Hyper-V server. E.g. if you were running the first AD lab it would be:

      .\Deploy-ADLab1.ps1
    
  • If you want to code on your local machine rather than on one of the provisioned servers, you will need to make sure that you have the RSAT installed on your workstation so that you can administer things like AD and IIS.

Settings

We hold all of our settings that you can tweak in the PoshAdmin.json file. The settings are:

Network

Default: 172.16.1.1
The Network variable is the first valid IP of the network used for the lab settings.

CIDR

Default: 24
The CIDR variable denotes how large we want the network to be.

DefaultRAM

Default: 4GB
The DefaultRAM variable is the default amount of RAM to assign to each VM that is created.

AdminName

Default: PA-Admin
The AdminName variable will be the domain admin account that PoshAdmin uses to connect to the VMs and perform required actions.

AdminPassword

Default: Alibi1-Favorably-Raving-Unpaid
The AdminPAssword variable is the password for the account defined above. There shouldn't be much risk for leaving it as it since this is all just meant for labbing but you can change it here if you like.

Challenges

  1. Active Directory
    1. Level 1

      1. Create and OU
      2. Create a user inside the OU
      3. Create a security group in the OU
      4. Add the user to the group
      5. Reset the user's password
    2. Level 2

      1. Remove the user
      2. Remove the group
      3. Remove the OU

Validation

There are many ways to solve most problems in PowerShell and we're not about trying to force you down a specific route. To that end, we only check the end result and let you get there however you like.

Each challenge will have it's own folder. Inside that folder there will be a <level>.<category>.tests.ps1 file that will check the end result is present. For example, if the challenge was for level 1 of Active Directory it would be:

.\Level1.AD.Tests.ps1

You're expected to write the script as if it were being executed on the domain controller unless otherwise specified. You then pass you script to the test script. Using the level 1 Active Directory example again it would look something like:

    .\Level1.AD.Tests.ps1 -Script .\SampleSolution\Level1.AD.Solution.ps1

Running a Test

Removing the lab

When you have finished with the lab you will need to run the Remove-<LabIdentifier>.ps1 script that is in the directory. For example, if we use the Level 1 Active Directory again th command would be:

    .\Remove-ADLab1.ps1

RemoveLab

ToDo

Please check out the Tasks board for my current list of tasks I would like to implement and their status.

About

This repository contains PowerShell challenges focused at Windows administration tasks rather than arbitrary coding tasks.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages