Command Line Parameters invalid


Running the following command in windows powershell and receive an error regarding invalid parameter expressions

PS C:> “C:\Program Files\PDFCreator\PDFCreator.exe” /PrintFile=“C:\Users\Public\Public Temporary\test.jpg” /PrinterName=“JS”
At line:1 char:47

  • “C:\Program Files\PDFCreator\PDFCreator.exe” /PrintFile="C:\Users\Pub …
  •                                           ~

You must provide a value expression following the ‘/’ operator.
At line:1 char:47

  • … eator.exe" /PrintFile=“C:\Users\Public\Public Temporary\test.jpg” /Pr …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unexpected token ‘PrintFile=“C:\Users\Public\Public Temporary\test.jpg”’ in expression or statement.
+ CategoryInfo : ParserError: (:slight_smile: [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpectedValueExpression

Appreciate any assistance


Hi mango

I think it is a powershell specific issue, running the command in cmd should work, I can’t see any issues with it. Perhaps you somehow need to escape the forward slash for powershell usage, but I have rarely used it so this is only a guess.

best regards



Hi Robin,
You are correct, it was a powershell issue, worked in CMD.
I have posted in another thread about the command line parameter PrinterName being ignored for MS Office files.
Hope you can help.