here is the link I was reading
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-5.1The stop-parsing symbol is effective only until the next newline or pipeline character. You cannot use a continuation character (`) to extend its effect or use a command delimiter (;) to terminate its effect.
----------------------
icacls X:\VMS --% /grant Dom\HVAdmin:(CI)(OI)F
PowerShell sends the following command string to the Icacls program:
X:\VMS /grant Dom\HVAdmin:(CI)(OI)F
-----------------------
if you want an example of the ESPMGR command I have a KORN shell script I wrote many years ago to do a do many of the functions using it ...
Actually had a long discussion with Ray Nissan (ESP originator) on why I used this command rather than ESPLMI (which was new at the time). I could pass it along ...
Original Message:
Sent: 08-27-2019 12:50 PM
From: Tre Daniel
Subject: ESPLMI and APPLINS Command
Nicolas,
Would you happen to have any examples of that in use? I tried adding that to the end of the statement and the end of the command with no success so far.
Original Message:
Sent: 08-27-2019 12:06 PM
From: Nicolas Colicchio
Subject: ESPLMI and APPLINS Command
Tre,
thanks for your response ... and correction :) .. I did a little reading and how about using the "--%" after the ESPLMI to stop Powershell from parsing the string and send it to the command as one token ?
Original Message:
Sent: 08-27-2019 10:48 AM
From: Tre Daniel
Subject: ESPLMI and APPLINS Command
Nicolas,
I appreciate the reply. I have a ton of PowerShell experience, but very little with ESP. The escape character for PowerShell is actually the grave character (`). If this was an issue with PowerShell, I'd receive an error indicating that the next part of that command was not recognized as a cmdlet, function, etc... I have tried a number of different characters (including backslashes) hoping to escape the semicolon that the executable is having an issue with, but we receive the same message from ESP. As a side note, I've tried passing this as an argument via command prompt (not PowerShell) as well and we receive the same message from that too. From what I can tell based on the documentation and everything I've tried, this appears to be a defect with the executable. But if anyone has any further suggestions, please let me know.
Original Message:
Sent: 08-27-2019 10:31 AM
From: Nicolas Colicchio
Subject: ESPLMI and APPLINS Command
Tre,
my experience with Powershell may be limited ... however when I needed to pass a semi-colon ... I needed to build that argument as a strict variable encapsulated with quotes ... then in my command string I reference the variable ... also in PowerShell the escape character is a backslash ... so you should have been passing a "\;" to pass a semicolon ... PowerShell attempts to try and figure out what you are doing but does always do what you want ...
Original Message:
Sent: 08-26-2019 02:05 PM
From: Tre Daniel
Subject: ESPLMI and APPLINS Command
The splitting is not being done in PowerShell. Attempting to pass the command that Jonathan listed above as an argument to ESPlmi.exe via -c"command" returns: APPL(ADHOCAPP.0) STATEMENTS('AIX_JOB PORTALTST.%ESPAHH%ESPAMN%ESPASSESPWSS900I ENDING QUOTE ASSUMED, 'AIX_JOB PORTALTST.%ESPAHH%ESPAMN%ESPASS
-->AGENT+ TESP500
ESPWSS101W INVALID COMMAND, AGENT+
-->SCRIPTNAME /tech/prod/scripts/ESPTST01
ESPWSS628W INVALID COMMAND NAME SYNTAX
-->ENDJOB')
ESPWSS101W INVALID COMMAND, ENDJOB')
I can log in interactively via ESPlmi.exe and the statement passes without issue, but if you attempt to pass it as an argument/switch it fails. This occurs when using PowerShell or command prompt. I've attempted escaping the semicolons via ` or ^ for both and the same error is returned. Other commands appear to function, but they do not require a semicolon in the middle of the command.
Original Message:
Sent: 08-26-2019 11:53 AM
From: Nicolas Colicchio
Subject: ESPLMI and APPLINS Command
The splitting up is being done by PowerShell ... not the ESPLMI command ... you either need to encapsulate the parameter with quotes(/double quotes) or escape the semi-colon ... I have run into this with PowerShell before ...
with the Rest-Method now available in ESP 12 ... there may be a better way to do this not having to use ESPLMI ...
I have done such adhoc job request but did not use ESPLMI ... but the ESPMGR command to call an open appl to trigger an event passing information via the USER fields.
Original Message:
Sent: 08-23-2019 03:44 PM
From: Jonathan Calloway
Subject: ESPLMI and APPLINS Command
Hello!
We are building a self-service portal to give user the ability to run ADHOC jobs in non-prod. We are using PowerShell to call esplmi and pass an applins command like this:
APPLINS APPL(ADHOCAPP.0) STATEMENTS( 'AIX_JOB PORTALTST.%ESPAHH%ESPAMN%ESPASS;AGENT TESP500;SCRIPTNAME /tech/prod/scripts/ESPTST01;ENDJOB')
However, when passing this in to esplmi as a parameter, the statements are split up seemingly because it doesn't 'like' the semi colons.
We have reviewed the following community post:
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=732187#bma5b2edd0-4ca6-4904-895b-9df56cefb5ed
However, since there were no details on how web services were used, and current documentation does not seem to have informaton on issueing commands, this was not helpful!
Thanks!
Jonathan