Introduction
Variables hold information so you can use or change it later in your script. They keep data safe while your script runs.
$variableName = value
$name = "Alice"$age = 30$greeting = "Hello, $name!"$user = "Sam" $age = 25 Write-Output "User name is $user" Write-Output "User age is $age"
count with value 5 in PowerShell?$name = "Anna" Write-Output $name
$age = 30 Write-Output age
Pass the test and this pattern moves unknown