What is the exact syntax needed in a PowerShell script to call ESPlmi?
I have reviewed existing discussions. Excuse me if this is already documented in this forum.
I want to change from having my existing ESP job which calls a .bat to have it call a PowerShell script instead. My ESP job is triggering the powershell script, but then it errors as shown. In this example I am just asking ESPlmi to grab some event details.
I have tried various quoting scenarios, comma separators, parens, but couldn't the right statement.
the basics of the script is -
Set-Location e:\'Program Files'\CA\WA_Agent
ESPlmi.exe -s<server>:<port> -u<user> -p<password> -c"l level(espm2ht.dist_WNZC*280) all"
error -
ESPlmi.exe : The term 'ESPlmi.exe' is not recognized as the name of a cmdlet,
function, script file, or operable program.
^^^^^^^^^^^^^^^^^^^^^^^^^^
ESPlmi 2.1.0004
Syntax: ESPlmi -shost:port -uuserid -ppassword -ccmd -h
When specifying an option that takes an argument, do not enter a
space between the option and the argument. For example:
ESPlmi -slpara:1234
Where: -s Specifies the hostname:address and port of the Workstation
Server. eg: hosta:3200
-u Specifies the userid to use to log onto the Workstation
Server.
-p Specifies the password to use to log onto the Workstation
Server.
-c Specifies the command(s) to issue once logged on. The command
can be a list of commands separated by a semi-colon. The
command can also be a file containing commands, indicated by
prefixing the filename (command) with an @ sign.
eg: "-cLAP APPL.0 ALL"
eg: "-cLSYS;LDSN"
eg: "-c@C:\commands.txt"
-h Displays this message. If specified, other options are
ignored.
^^^^^^^^^^^^^^^^^^^^^^^^^^
I have read that it is not best practice to have PowerShell use cmd /c
I tried the & call operator, but did not get it to work.
The Call Operator &
The call operator, also known as the invocation operator
https://social.technet.microsoft.com/wiki/contents/articles/7703.powershell-running-executables.aspx?wa=wsignin1.0
------------------------------
Cigna
------------------------------