[Powershell] how to add Quotes in a character string?

Click to rate this post!
[Total: 0 Average: 0]
Powershell, How to add quotes in a string variable?
Many people ask the question of quotation marks in a character chain, moreover very useful it is famous “”. No matter how hard you look, I will give you the answer below.

In powershell, there are many tricks including this one, which is vital to know.

$string= “Hello, here is a “powershell “string with quotes

here you have an error!

To get around this, you must add the character `in front of the quotation marks of the chain. This is the “Tilt” character

This Tilt tells powershell not to interpret the next character.

$string= “Hello, here is a `”powershell “string with quotes

Leave a Reply

Your email address will not be published. Required fields are marked *