$x= 1
New-Variable -Name x -Value 12
Get-Variable x -valueonly
Set-Variable -Name x -Value 34
Clear-Variable -Name x
Remove-Variable -Name x
# Print the value$x# which is an equivalent of:Write-Host$x# Get the type$x.GetType()# Strongly typed[int]$x= 2
# Comparisons$x -eq 20
$x -gt 20
$x -lt 20
$str='Text 1'$str2="Text 2"# Newline"First line`nSecond line"
$multiline = @"
Multiline text
Anouther line
"@
# Single quotes
$multiline = @'
Multiline text
Anouther line
'@
# Variables in text
$x = 1
$y = 1
"Text with variable $x and $y"
# Formatting text
[String]::Format("Some text with {0}", $x)
# Short version
"Some text {0} and {1}" -f $x, $y