Why variables store data
📖 Scenario: You are learning how to use variables in PowerShell to store information. Variables help you keep data so you can use it later in your script, just like putting things in labeled boxes to find them easily.
🎯 Goal: Build a simple PowerShell script that creates a variable to store a name, then stores an age in another variable, and finally prints both values to the screen.
📋 What You'll Learn
Create a variable called
$name and assign it the value "Alice"Create a variable called
$age and assign it the value 30Print the values of
$name and $age using Write-Output💡 Why This Matters
🌍 Real World
Variables let you save user input, settings, or results in scripts to automate tasks.
💼 Career
Knowing how to store and use data in variables is a basic skill for any scripting or automation job.
Progress0 / 4 steps