You must provide a value expression on the right-hand side of the '-' operator

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 6 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
ashishk
Posts: 19
Last visit: Mon Apr 10, 2017 12:08 am

You must provide a value expression on the right-hand side of the '-' operator

Post by ashishk »

Product, version and build:
(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: 64
Operating system: Widnows 7
32 or 64 bit OS:64
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM


Using PrimalScript I compiled script for 64 bit and 32 bit machines. I am running the command as

updateUser.exe -commit 0 -location c:\userlogs

This is working perfectly in 64 bit machine, but when I run on Windows 7 32bit machine I am getting following error

You must provide a value expression on the right-hand side of the '-' operator

Any idea what could be the cause and how to resolve this?

Ash
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by Alexander Riedel »

That is impossible to tell without your code and the actual error message containing a line number.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by Alexander Riedel »

Upon reviewing your account I noticed that you received a trial extension on February 13th for 30 days. That extension has expired now.
Please associate a license with you account for further support. Thank you.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ashishk
Posts: 19
Last visit: Mon Apr 10, 2017 12:08 am

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by ashishk »

Alenxender

To get the license version, I already raised a request to my purchase report to buy the license.

However if you see below code, I am getting error in row 20.
Attachments
32biterror.png
32biterror.png (40.12 KiB) Viewed 16321 times
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by Alexander Riedel »

No idea. You should probably post this in the PowerShell section. This is most certainly not a product problem.
From the snippet of code I see no '-' operator in that line, so most likely the line number is off for some reason.
One thing stands out in this code though. You never check if $formatedSheetData actually contains valid data.
If it does not, $process.Action in line 19 would fail.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ashishk
Posts: 19
Last visit: Mon Apr 10, 2017 12:08 am

Re: You must provide a value expression on the right-hand side of the '-' operator

Post by ashishk »

Alexender

I found the problem, actually -notin element is not supported in PowerShell 2.0. So I used -notcontains element and it works.

Secondly as you said about $formatedSheetData, actually it will never empty because csv which I am porting always have two rows.
This topic is 6 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.