473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to solve this PowerShell command error message?

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.addExpressionR ule(Tokenizer tok)
at
System.Management.Automation.Parser.comparisonExpr essionRule(Tokenizer tok)
at
System.Management.Automation.Parser.bitwiseExpress ionRule(Tokenizer tok)
at
System.Management.Automation.Parser.logicalExpress ionRule(Tokenizer tok)
at
System.Management.Automation.Parser.assignmentStat ementRule(Tokenizer tok)
at System.Management.Automation.Parser.pipelineRule(T okenizer tok)
at System.Management.Automation.Parser.statementRule( Tokenizer tok)
at System.Management.Automation.Parser.statementListR ule(Tokenizer tok)
at System.Management.Automation.Parser.Parse(String input, Int32
cursorPosition)
at System.Management.Automation.AutomationEngine.Pars e(String script,
Boolean interactiveCommand)
at
System.Management.Automation.ShellFunctionCommandP rocessor..ctor(String
script, ExecutionContext context, Boolean isFilter, Boolean useLocalScope,
Boolean interactiveCommand)
at
System.Management.Automation.Runspaces.Command.Cre ateCommandProcessor(ExecutionContext
executionContext, CommandFactory commandFactory, Boolean addToHistory)
at
System.Management.Automation.Runspaces.LocalPipeli ne.CreatePipelineProcessor()
at System.Management.Automation.Runspaces.LocalPipeli ne.InvokeHelper()
at
System.Management.Automation.Runspaces.LocalPipeli ne.InvokeThreadProc()
Jul 31 '07 #1
0 1065

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Neil Chambers | last post by:
Hi All, I'm looking to see if it's feasible to use the SortObjectCommand included in the Microsoft.Powershell.Commands assembly. I have a Dictionary Dictionary<string, intd = new...
3
by: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= | last post by:
1. Is there a dedicated discussion group for Windows Powershell? I couldn't find one, but that doesn't necessarily mean there isn't :-) 2. I'm just starting in on learning to use Powershell and...
6
by: Mesan | last post by:
Does anyone have an idea what it takes to administer DB2 through PowerShell? I want to write some scripts to automate my common DB2 management tasks and I'd really like to be able to use...
0
by: vincent90152900 | last post by:
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...
1
by: Alexander Vasilevsky | last post by:
Hi! How to debug Powershell commandlets? -- http://www.alvas.net - Audio tools for C# and VB.Net developers
5
by: josepharmbruster | last post by:
I am all about using the right tool for the right purposes, which is why I have started reading the GettingStarted guide to PowerShell. I am curious if any other pythoneers have ventured into the...
4
by: superdave67 | last post by:
How can I run... C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -command ". 'C:\Program...
1
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i read the MS kb: Using Exchange Management Shell Commands With Managed Code http://msdn.microsoft.com/en-us/library/bb332449.aspx how ever i'm getting "{"No Windows PowerShell Snap-ins are...
1
by: =?Utf-8?B?bGVyb3ljYXJs?= | last post by:
Problem is that I want to use PowerShell and a csv file to update a database (Access, SQL, whatever). I do this now with VBScript. I have made a simple example of the ps1 script and text file and...
1
by: SCRIPT KEEPER | last post by:
Hello, I am a complete noob and just starting off with csharp so I apologize for my basic question. I am wanting to start powershell from inside a batch script and then to pass the powershell args...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.