Special Characters

In PowerShell, back-quotes (`) are treated as special character strings.

Escape string

Backquotes (`) are treated as escape strings.

# Example: The first "$" is escaped and is not treated as a variable. 
PS> $str = 'String'
PS> "`$str is $str"
$str is String

String with a specific meaning

Back-quotes and strings can be combined to have a specific meaning.

# Example: "`r`n" is a carriage return + newline.
PS> "Windows 7`r`nWindows 10"
Windows 7
Windows 10

Other examples.

`$  $
`0  null
`a  Alert
`b  Backspace
`n  New line
`r  Carriage return
`t  Horizontal tab
`'  Single quotation
`"  Double quotation
``  Axangrave
`f  Form feed
`v  Vertical tab

Line continuation character string

Backquotes (`) are also treated as line continuation characters.
They may be used for purposes such as making scripts easier to read.

PS> Get-ChildItem r* `
>> -Recurse
>>
# Equivalent to the following
# PS> Get-ChildItem r* -Recurse

YouTube

Click here for a video explanation.

About Special Characters | Microsoft Docs

Last modified October 11, 2022: update (8216439)