Challenge - 5 Problems
PowerShell First Command Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this PowerShell command?
Consider the following PowerShell command:
What will this command display in the console?
Write-Output "Hello, World!"
What will this command display in the console?
PowerShell
Write-Output "Hello, World!"Attempts:
2 left
💡 Hint
Write-Output sends the text to the console.
✗ Incorrect
The Write-Output command prints the string to the console exactly as given.
💻 Command Output
intermediate2:00remaining
What does this PowerShell command output?
Look at this command:
What kind of output will it produce?
Get-Date -Format "yyyy-MM-dd"
What kind of output will it produce?
PowerShell
Get-Date -Format "yyyy-MM-dd"Attempts:
2 left
💡 Hint
The -Format parameter controls how the date is shown.
✗ Incorrect
Get-Date with -Format "yyyy-MM-dd" outputs only the date in year-month-day format.
📝 Syntax
advanced2:00remaining
Which PowerShell command correctly assigns a string to a variable?
You want to store the text "Hello" in a variable named greeting. Which command is correct?
Attempts:
2 left
💡 Hint
Strings need quotes and variables start with $ in PowerShell.
✗ Incorrect
In PowerShell, variables start with $, and strings must be in quotes.
🔧 Debug
advanced2:00remaining
What error does this PowerShell command produce?
Examine this command:
What happens when you run it?
Write-Output Hello World
What happens when you run it?
Attempts:
2 left
💡 Hint
Write-Output can take multiple arguments separated by spaces.
✗ Incorrect
Write-Output outputs all arguments separated by spaces, so it prints Hello World.
🚀 Application
expert2:00remaining
How many items does this PowerShell command output?
Consider this command:
How many numbers will be output?
1..5 | ForEach-Object { $_ * 2 }How many numbers will be output?
PowerShell
1..5 | ForEach-Object { $_ * 2 }
Attempts:
2 left
💡 Hint
1..5 creates a list of 5 numbers, each doubled.
✗ Incorrect
The command processes numbers 1 to 5, doubling each, so outputs 5 numbers.