Page 1 of 1

Parsing Errors

Posted: Fri Mar 11, 2016 7:48 pm
by starbucksgold
Shannon,

I have some basic PS scripts that work in PS but when executed through the plugin fails.

Script:
$app = gwmi -Class win32_product | Where-Object {$_.Name -eq "ZixM*"}
$app.Uninstall()

Via Plugin produces the following:

Executing -> $app = gwmi -Class win32_product | Where-Object {$_.Name -eq `"ZixM*"`}

$app.Uninstall()

<#><#><#>You must provide a value expression on the right-hand side of the '-eq' operato
r.
At line:1 char:61
+ $app = gwmi -Class win32_product | Where-Object {$_.Name -eq <<<< `ZixM*`}
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
ception
+ FullyQualifiedErrorId : ExpectedValueExpression


Ideas on how to resolve?

Thanks.

Jeff

Re: Parsing Errors

Posted: Mon Mar 14, 2016 12:55 pm
by Cubert
Yeap, simply add a ( ; ) between commands

like so...

Code: Select all

$app = gwmi -Class win32_product | Where-Object {$_.Name -eq "ZixM*"};$app.Uninstall()

Re: Parsing Errors

Posted: Thu Mar 17, 2016 1:32 pm
by Cubert
Jeff,
Your gonna like this!!!

Save scrips in script manager!!
Capture33.PNG
Capture33.PNG (47.51 KiB) Viewed 16675 times
Execute scripts at the PC Console
Capture333.PNG
Capture333.PNG (52.13 KiB) Viewed 16675 times

Oh how yummy!! :ugeek:

Re: Parsing Errors

Posted: Wed Mar 23, 2016 1:03 pm
by starbucksgold
You are right...I like this. :D

Thanks.

Jeff

Re: Parsing Errors

Posted: Wed Mar 23, 2016 1:05 pm
by Cubert
need to add a prams passer to the script executer.. thats next..