-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.
Description
Steps to reproduce
Create a batch file mybatch.cmd containing:
@echo off
echo %1
echo %2In PowerShell call it with
PS C:\Users\me> .\mybatch.cmd "a,b"
a
b
PS C:\Users\me> .\mybatch.cmd 'a,b'
a
b
PS C:\Users\me> .\mybatch.cmd --% "a,b"
"a,b"
ECHO is off. # this is expected in cmd
PS C:\Users\me> .\mybatch.cmd --% 'a,b'
'a
b' # this is expected in cmdExpected behavior
Comma inside the string should be preserved, like when calling it in cmd:
mybatch.cmd "a,b"
"a,b"
ECHO is off.Actual behavior
Comma is parsed as array.
Environment data
$PSVersionTable
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
$PSVersionTable
Name Value
---- -----
PSVersion 7.0.0-preview.6
PSEdition Core
GitCommitId 7.0.0-preview.6
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.