vincent

vincent

  • NA
  • 9
  • 0

How to solve this PowerShell command error message?

Jul 30 2007 11:50 PM

I'm trying to get PowerShell script to run a program. Here is the command line I need to run:

"\"C:\\Program Files\\PDF2allTest\\pdf2all\" -c pdf2jpg -s \"c:\\test\\test\\01.pdf\" -or 600"

I get the following error message. How to solve this?

System.Management.Automation.ParseException was unhandled
  Message="You must provide a value expression on the right-hand side of the '-' operator."
  Source="System.Management.Automation"
  StackTrace:
       at System.Management.Automation.Parser.addExpressionRule(Tokenizer tok)
       at System.Management.Automation.Parser.comparisonExpressionRule(Tokenizer tok)
       at System.Management.Automation.Parser.bitwiseExpressionRule(Tokenizer tok)
       at System.Management.Automation.Parser.logicalExpressionRule(Tokenizer tok)
       at System.Management.Automation.Parser.assignmentStatementRule(Tokenizer tok)
       at System.Management.Automation.Parser.pipelineRule(Tokenizer tok)
       at System.Management.Automation.Parser.statementRule(Tokenizer tok)
       at System.Management.Automation.Parser.statementListRule(Tokenizer tok)
       at System.Management.Automation.Parser.Parse(String input, Int32 cursorPosition)
       at System.Management.Automation.AutomationEngine.Parse(String script, Boolean interactiveCommand)
       at System.Management.Automation.ShellFunctionCommandProcessor..ctor(String script, ExecutionContext context, Boolean isFilter, Boolean useLocalScope, Boolean interactiveCommand)
       at System.Management.Automation.Runspaces.Command.CreateCommandProcessor(ExecutionContext executionContext, CommandFactory commandFactory, Boolean addToHistory)
       at System.Management.Automation.Runspaces.LocalPipeline.CreatePipelineProcessor()
       at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
       at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()