Trouble calling upon two arguments
Posted: Wed Aug 01, 2018 9:25 am
Right now here is what I have,
It only call's the /2 not the /Y
Commandline works just fine but not power shell.
What do you suggest...
I have also made variables and then called upon them but still the same thing exist.
Please advise..
Code: Select all
$dataup = "C:\Program Files (x86)\R.O. Writer\dataup.exe"
Start-Process $dataup /2/Y
Commandline works just fine but not power shell.
What do you suggest...
I have also made variables and then called upon them but still the same thing exist.
Code: Select all
PS C:\> Start-Process $dataup /2/Y
PS C:\> Start-Process $dataup /2 /Y
Start-Process : A positional parameter cannot be found that accepts argument '/Y'.
At line:1 char:1
+ Start-Process $dataup /2 /Y
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
PS C:\> Start-Process $dataup "/2 /Y"
PS C:\> Start-Process $dataup "/2"+"/Y"
Start-Process : A positional parameter cannot be found that accepts argument '+/Y'.
At line:1 char:1
+ Start-Process $dataup "/2"+"/Y"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
PS C:\> Start-Process $dataup /2/Y
PS C:\> Start-Process $dataup "/2",/Y
PS C:\> Start-Process $dataup "/2","/Y"
PS C:\> Start-Process $dataup /2;/Y
/Y : The term '/Y' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:26
+ Start-Process $dataup /2;/Y
+ ~~
+ CategoryInfo : ObjectNotFound: (/Y:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\> Start-Process $dataup "/2";"/Y"
/Y
PS C:\> Start-Process $dataup '/2';'/Y'