Use StringBuilder to combine multiple strings
$stringBuilder = New-Object System.Text.StringBuilder for ($i = 0; $i -lt 10; $i++){ $stringBuilder.Append("Line $i`r`n") | Out-Null } $stringBuilder.ToString()
Combine multiple strings
$string1 = "The quick brown fox " $string2 ="jumps over the lazy dog" $string1 + $string2
HERE-STRINGS
$string = @" "The quick brown fox jumps over the lazy dog" is an English-language pangrama sentence that contains all of the letters of the alphabet. It is commonly used for touch-typing practice, testing typewriters and computer keyboards, displaying examples of fonts, and other applications involving text where the use of all letters in the alphabet is desired. Owing to...
Creat a literal string
$animal = 'fox' 'The quick brown $animal jumps over the lazy dog.'
Evaluate a Expression in a string
$animal = 'FOX' "The quick brown $($animal.ToLower()) jumps over the lazy dog $(2 + 3) times."
Evaluate an Variable in a string
$animal = 'fox' "The quick brown $animal jumps over the lazy dog."