1

Let's say I have a batch file named hello.bat that takes two parameters.

According to the answer here: passing a second parameter in a batch file, I can use the following to pass two parameters using powershell:

start-process hello "test test2"

Now, considering that the two parameters are separated by space, how would I pass a parameter with a space. For instance what if the first parameter was test one instead of test? I have tried start-process hello "test","test 2", does not seem to work.

2
  • 2
    Did you try, start-process hello """test one"",test2" Commented Mar 3, 2018 at 21:44
  • 1
    i did now. works perfectly. could you post it as the answer so i can mark it? Commented Mar 3, 2018 at 21:47

1 Answer 1

1

You could try adding double doublequotes like this:

start-process hello """test one"",test2"

Hope this helped you out!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.