0
0
PowerShellscripting~20 mins

PowerShell console and ISE - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
PowerShell ISE Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Output difference between PowerShell console and ISE
What is the output of the following command when run in PowerShell ISE versus PowerShell console?

Write-Host "Hello, $($PSVersionTable.PSVersion)"
PowerShell
Write-Host "Hello, $($PSVersionTable.PSVersion)"
AHello, 7.2.0.0 in PowerShell console and Hello, 5.1.19041.1237 in ISE
BHello, 5.1.19041.1237 in PowerShell console and Hello, 7.2.0.0 in ISE
CHello, 7.2.0.0 (or current version) in both PowerShell console and ISE
DError: $PSVersionTable is undefined in ISE
Attempts:
2 left
💡 Hint
Check the default PowerShell versions used by console and ISE.
📝 Syntax
intermediate
1:30remaining
Correct way to run a script in PowerShell ISE
Which option correctly runs a script named myscript.ps1 from PowerShell ISE's console pane?
AInvoke-Command myscript.ps1
BRun-MyScript myscript.ps1
C.\myscript.ps1
DStart-Process myscript.ps1
Attempts:
2 left
💡 Hint
Think about how to run scripts in PowerShell using relative paths.
🔧 Debug
advanced
2:30remaining
Why does this script behave differently in PowerShell console and ISE?
Given this script:
Write-Host "Starting script"
Start-Sleep -Seconds 3
Write-Host "Script finished"

When run in PowerShell console, the output appears after 3 seconds delay. In ISE, the output appears immediately and then the delay happens. Why?
APowerShell ISE buffers Write-Host output and displays it after the script finishes
BStart-Sleep behaves differently in ISE causing delay before output
CWrite-Host is asynchronous in ISE but synchronous in console
DISE runs scripts in a separate thread causing output timing differences
Attempts:
2 left
💡 Hint
Think about how output buffering works in ISE versus console.
🚀 Application
advanced
2:00remaining
Using PowerShell ISE to debug a script with breakpoints
Which of the following steps correctly sets a breakpoint in PowerShell ISE to pause execution at line 5 of a script?
ARight-click line 5 and select 'Run to Cursor'
BAdd the command <code>Set-Breakpoint -Line 5</code> inside the script
CUse <code>Start-Debug -Line 5</code> in the console pane
DClick the left margin next to line 5 or press F9 while the cursor is on line 5
Attempts:
2 left
💡 Hint
Think about how breakpoints are set visually in ISE.
🧠 Conceptual
expert
3:00remaining
Why is PowerShell ISE deprecated and what is recommended instead?
PowerShell ISE is deprecated and no longer updated. What is the recommended modern alternative for scripting and automation?
AUse PowerShell console exclusively without any GUI
BUse Visual Studio Code with the PowerShell extension
CUse Windows Terminal only without any editor
DUse Notepad++ with PowerShell syntax highlighting
Attempts:
2 left
💡 Hint
Think about modern editors that support PowerShell well.