0

I'm trying to execute the following piece of code but i'm getting the following error which i can't figure out. Tried various variations but at a loss:

& ".\Pacli.exe" updateuser 'vault="PACLI Vault"' 'user=AWSPacli' 'destuser=UserTest' Password=$NewPassword
Pacli.exe: parse error, expecting `';'`
At line:1, char:1

Tried using Invoke-Expression and passing in the whole command as a variable but still get the same error. Not sure if it is to do with the way i am putting quotes around some of the parameters.

A previous command to this works perfectly fine:

& ".\Pacli.exe" logon 'vault="PACLI Vault"' 'user=AWSPacli' password=$PACPassword

Trying to use the PACLI for CyberArk and updating a user password in Vault.

apaterson
  • 13
  • 3
  • 1
    [This CyberArk document](https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PACLI/Getting-Started-Functions.htm) seems to indicate that all commands should be terminated with a semicolon. I would be inclined to enclose the entire set of parameters in double quotes, take out the single quotes, and end with a semicolon: `& ".\Pacli.exe" "updateuser vault='PACLI Vault' user=AWSPacli destuser=UserTest Password=$NewPassword;"` – Rich Moss Sep 10 '19 at 22:34
  • 1
    Hi @RichMoss - turns out my actual issue was the password that i was generating. Creating a random password with a number of non alpha numeric chars - i think was the problem. Anyway i have also added in the ; which you mentioned and appeared to work as well. Thanks for your feedback/help. – apaterson Sep 11 '19 at 08:43

0 Answers0