Search found 3 matches

by Gregor Y
2022-Jul-20, 8:34 pm
Forum: Windows CMD Shell
Topic: Double Quotes embedded in Double Quotes
Replies: 3
Views: 1787

Re: Double Quotes embedded in Double Quotes

that in turn leads to this one working in Windows-PowerShell v5.1(non ISE)

Code: Select all

PS C:\Working\Path> powershell.exe -command '$m=\"hello world\";write-host $m'
which I would not have expected
by Gregor Y
2022-Jul-20, 8:24 pm
Forum: Windows CMD Shell
Topic: Double Quotes embedded in Double Quotes
Replies: 3
Views: 1787

Re: Double Quotes embedded in Double Quotes

thanks, I also noticed this version works as well

Code: Select all

powershell.exe -command "&{$m = \"hello world\";write-host $m}"
by Gregor Y
2022-Jul-20, 5:58 pm
Forum: Windows CMD Shell
Topic: Double Quotes embedded in Double Quotes
Replies: 3
Views: 1787

Double Quotes embedded in Double Quotes

Hi there, Can you please add the following example on how to embed double quotes to the "Using "Double Quotes"" section of the Escape Characters page. powershell.exe -command "&{$m = "\""hello world"\"";write-host $m}" Thanks! this is a...