- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
04-01-2020 03:08 PM
I have an existing PACLI script that has been working, but we have had to cut-n-paste the password into the PACLI file to make it work.
Now that we have acquired AIM licenses, I'd like to use the AIM SDK to pull the password into the PACLI script.
For example:
set paclifolder=D:\PACLI\7.20
set pacli=%paclifolder%\pacli.exe
set pacliinfolder=D:\PACLI\Test\InputFiles
%pacli% init sessionid=1001
%pacli% definefromfile vault=pacli parmfile=%paclifolder%\Vault.ini sessionid=1001
%pacli% default vault=pacli user=Administrator sessionid=1001
%pacli% logon password=Cyberark123 sessionid=1001
%pacli% FINDFILES FOLDER="Root"....................
%pacli% logoff sessionid=1001
%pacli% term sessionid=1001
So if I want to use AIM my script, it would something like this:
set paclifolder=D:\PACLI\7.20
set pacli=%paclifolder%\pacli.exe
set pacliinfolder=D:\PACLI\Test\InputFiles
set aimfolder=D:\Program Files (x86)\CyberArk\ApplicationPasswordSdk
%pacli% init sessionid=1001
%pacli% definefromfile vault=pacli parmfile=%paclifolder%\Vault.ini sessionid=1001
%pacli% default vault=pacli user=CA_Script sessionid=1001
%pacli% logon password=%aimfolder%\CLIPasswordSDK.exe GetPassword /p AppDescs.AppID=PACLI_Test /p Query="Safe=PACLI2_Test;Folder=Root;Object=x_cascript" /o Password sessionid=1001
%pacli% FINDFILES FOLDER="Root"....................
%pacli% logoff sessionid=1001
%pacli% term sessionid=1001But of course the password= does NOT like all the arguments from the "CLIPasswordSDK.exe" command.
I'm getting the wonderful error in line 9 above:
parse error, expecting `';''
from the PACLI script. And searching the Cyberark Support page for this parse error is returning 1000+ hits, and I still have not found a hint.
I have found https://cyberark-customers.force.com/s/article/00002952 and tried putting double quotes, but still no love from PACLI.
04-01-2020 09:23 PM
Hi, try this
set paclifolder=D:\PACLI\7.20
set pacli=%paclifolder%\pacli.exe
set pacliinfolder=D:\PACLI\Test\InputFiles
set aimfolder=D:\Program Files (x86)\CyberArk\ApplicationPasswordSdk
for /f "delims=" %%p in ('^""%%aimfolder%%\CLIPasswordSDK.exe" GetPassword /p "AppDescs.AppID=PACLI_Test" /p "Query=Safe=PACLI2_Test;Folder=Root;Object=x_cascript" /o Password^"') do set pwd=%%p
%pacli% init sessionid=1001
%pacli% definefromfile vault=pacli parmfile=%paclifolder%\Vault.ini sessionid=1001
%pacli% default vault=pacli user=CA_Script sessionid=1001
%pacli% logon password=%pwd% sessionid=1001
%pacli% FINDFILES FOLDER="Root"....................
%pacli% logoff sessionid=1001
%pacli% term sessionid=1001
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

