Challenge - 5 Problems
PowerShell Automation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Purpose of PowerShell
Why was PowerShell created as a scripting and automation tool?
Attempts:
2 left
💡 Hint
Think about what tasks system administrators need to automate on Windows.
✗ Incorrect
PowerShell was designed to help automate and manage Windows systems by combining a command-line shell with a scripting language that can access system components easily.
🧠 Conceptual
intermediate2:00remaining
PowerShell vs Traditional Shells
What is a key reason PowerShell was developed instead of just using traditional shells like CMD or Bash?
Attempts:
2 left
💡 Hint
Think about how data is passed between commands in PowerShell compared to older shells.
✗ Incorrect
Unlike traditional shells that pass text, PowerShell passes objects, which allows scripts to handle data more precisely and flexibly.
💻 Command Output
advanced2:00remaining
PowerShell Command Output Format
What is the output of this PowerShell command?
Get-Process | Select-Object -First 1 | Get-Member -MemberType Property | Select-Object -First 3 -ExpandProperty Name
PowerShell
Get-Process | Select-Object -First 1 | Get-Member -MemberType Property | Select-Object -First 3 -ExpandProperty Name
Attempts:
2 left
💡 Hint
Get-Member lists properties alphabetically by default.
✗ Incorrect
The command lists the first process's properties alphabetically, so the first three property names are BasePriority, EnableRaisingEvents, and ExitCode.
🔧 Debug
advanced2:00remaining
Identify the Error in PowerShell Script
What error will this PowerShell script produce?
$services = Get-Service | Where-Object Status -eq 'Running'
$services | ForEach-Object { $_.Name }
PowerShell
$services = Get-Service | Where-Object Status -eq 'Running'
$services | ForEach-Object { $_.Name }Attempts:
2 left
💡 Hint
Check the syntax of the Where-Object command.
✗ Incorrect
The Where-Object command requires a script block {} around the condition. Without it, PowerShell throws a syntax error.
🚀 Application
expert3:00remaining
Automating File Backup with PowerShell
Which PowerShell script correctly copies all .txt files from C:\Data to D:\Backup, creating the destination folder if it doesn't exist?
Attempts:
2 left
💡 Hint
Check if the destination folder exists before copying files.
✗ Incorrect
Option A checks if the folder exists and creates it if needed, then copies the .txt files. Other options either miss folder creation or misuse parameters.