Introduction
Strings hold text in scripts. Interpolation lets you insert values inside text easily.
Double-quoted strings allow interpolation: "Hello, $name!" Single-quoted strings do not: 'Hello, $name!'
$name = "Alice" "Hello, $name!"
$count = 5 "You have $count new messages."
'Hello, $name!'$folder = "Documents" "C:\Users\$folder\file.txt"
$user = "Bob" $files = 3 $message = "User $user has $files files in the folder." Write-Output $message
$name inside a string in PowerShell?$name = "Alice" $message = "Hello, $name!" Write-Output $message
$user = 'Bob' $message = 'Welcome, $user!' Write-Output $message
$userName and their age stored in $age. Which of the following PowerShell commands correctly uses string interpolation to produce: Hello, Alice! You are 30 years old.Pass the test and this pattern moves unknown