Page 1 of 1

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

Posted: Tue Apr 04, 2017 12:36 am
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

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

Posted: Tue Apr 04, 2017 12:51 am
by Alexander Riedel
That is impossible to tell without your code and the actual error message containing a line number.

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

Posted: Tue Apr 04, 2017 1:01 am
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.

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

Posted: Tue Apr 04, 2017 4:25 am
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.

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

Posted: Tue Apr 04, 2017 9:41 am
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.

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

Posted: Tue Apr 04, 2017 10:09 pm
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.