0
0
PowerShellscripting~10 mins

First PowerShell command - Mini Project: Build & Apply

Choose your learning style9 modes available
First PowerShell command
📖 Scenario: You want to greet your team with a simple message using PowerShell. This is your first step into scripting with PowerShell.
🎯 Goal: Write a PowerShell script that stores a greeting message in a variable and then displays it on the screen.
📋 What You'll Learn
Create a variable called greeting with the exact text 'Hello, team!'
Use the Write-Output command to display the greeting variable
💡 Why This Matters
🌍 Real World
PowerShell scripts are used to automate tasks on Windows computers, like sending messages or managing files.
💼 Career
Knowing how to write and run simple PowerShell commands is useful for IT support, system administration, and automation roles.
Progress0 / 4 steps
1
Create a greeting variable
Create a variable called greeting and set it to the text 'Hello, team!'
PowerShell
Need a hint?

Use $greeting = 'Hello, team!' to create the variable.

2
Display the greeting
Use the Write-Output command with the variable $greeting to display the greeting message
PowerShell
Need a hint?

Type Write-Output $greeting to show the message.

3
Run the script to see the output
Run the script so it shows the greeting message on the screen
PowerShell
Need a hint?

Run the script by pressing Enter or using your PowerShell editor's run command.

4
Add a comment explaining the greeting
Add a comment above the variable $greeting explaining that it stores the welcome message
PowerShell
Need a hint?

Use # This variable stores the welcome message as a comment.