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.
-
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.
-
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
-
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.
We hold all of our settings that you can tweak in the PoshAdmin.json file. The settings are:
Default: 172.16.1.1
The Network variable is the first valid IP of the network used for the lab settings.
Default: 24
The CIDR variable denotes how large we want the network to be.
Default: 4GB
The DefaultRAM variable is the default amount of RAM to assign to each VM that is created.
Default: PA-Admin
The AdminName variable will be the domain admin account that PoshAdmin uses to connect to the VMs and perform required actions.
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.
- Active Directory
-
Level 1
- Create and OU
- Create a user inside the OU
- Create a security group in the OU
- Add the user to the group
- Reset the user's password
-
Level 2
- Remove the user
- Remove the group
- Remove the OU
-
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
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
Please check out the Tasks board for my current list of tasks I would like to implement and their status.


