0
0
PowerShellscripting~10 mins

First PowerShell command - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - First PowerShell command
Open PowerShell
Type command: Write-Output 'Hello'
Press Enter
PowerShell runs command
Output appears: Hello
Command prompt ready for next input
This flow shows how you open PowerShell, type a simple command, run it, and see the output.
Execution Sample
PowerShell
Write-Output 'Hello'
This command prints the word Hello to the screen.
Execution Table
StepActionInputOutputNotes
1Open PowerShellPowerShell prompt appearsReady to accept commands
2Type commandWrite-Output 'Hello'Command entered but not run yet
3Press EnterHelloCommand runs and prints output
4Prompt readyPS promptReady for next command
💡 Command finished running and output displayed
Variable Tracker
VariableStartAfter CommandFinal
OutputNone"Hello""Hello"
Key Moments - 2 Insights
Why do we see 'Hello' after pressing Enter?
Because Write-Output sends the string 'Hello' to the screen, as shown in execution_table step 3.
Is the command stored anywhere after running?
No, the command runs and shows output immediately; it does not save the output unless assigned to a variable.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the output at step 3?
APS prompt
BWrite-Output 'Hello'
CHello
DNo output
💡 Hint
Check the Output column in execution_table row for step 3
At which step does PowerShell run the command?
AStep 2
BStep 3
CStep 1
DStep 4
💡 Hint
Look at the Action column and Output column for when output appears
If you change the command to Write-Output 'Bye', what changes in the execution_table?
AOutput at step 3 changes to 'Bye'
BAction at step 2 changes
CPrompt at step 4 disappears
DNo changes
💡 Hint
Focus on the Output column at step 3 where the command output is shown
Concept Snapshot
PowerShell commands run by typing them and pressing Enter.
Write-Output prints text to the screen.
Output appears immediately after running.
Prompt returns ready for next command.
No output saved unless assigned.
Full Transcript
This lesson shows how to run your first PowerShell command. You open PowerShell, type Write-Output 'Hello', and press Enter. PowerShell runs the command and prints Hello on the screen. Then the prompt is ready for your next command. The output is not saved unless you store it in a variable. This simple flow helps you see how commands work step-by-step.