Powershell single quote vs double quote


I know that difference between using single quote instead of double quote is that variables aren’t expanded.

I am accustomed to use double quote, but I guess that single quote could be more efficient. Is this always true? Is there some documentation about this topic? I googled a bit but results are overwhelmed by explanation about expanding variables


Efficiency is very probably a non-issue if you don’t have embedded variables or subexpressions.

A quick test with Measure-Command showed no difference at all.


Powershell single quote vs double quote by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply