문제

I'm having an issue with passing arguments to an executable through powershell.

The command that I pass is: .\migrator.exe migrate -d12345,12333,12222 -i09877,787896,76866

Here's where I am having an issue. The command works perfectly in CMD shell, but in powershell, it fails on the commas and will not execute the command. Do I need to be passing this into an array object or wrapping it with quotes or what?

도움이 되었습니까?

해결책

If you are on PowerShell v3 or higher, you can have PowerShell pass the parameters to migrate.exe much like CMD would by using the --% operator e.g.:

.\migrator.exe migrate --% -d12345,12333,12222 -i09877,787896,76866
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top