Issues with ImportJKS.ps1 #2555
Replies: 3 comments 1 reply
-
Different consoles use different escaping logic, e.g. Powershell does things a little different then the good ol' command prompt. The safest is probably to use a single quote, e.g.:
|
Beta Was this translation helpful? Give feedback.
-
It gives me the same error when I try escaping with single quotes in Powershell.
|
Beta Was this translation helpful? Give feedback.
-
Does there happen to be a |
Beta Was this translation helpful? Give feedback.
-
Hello.
I am trying to run the ImportJKS.ps1 as a post script after getting the certificate issued by win-acme. I am running the below command:
wacs.exe --target manual --host host.dom.tld --store none --installation script --script "Scripts\ImportJKS.ps1" --scriptparameters "-pfxfile {CacheFile} -pfxpassword {CachePassword} -keystorefile D:\Certificates\keystore.jks -keystorepassword password123 -keystorekeypassword password1234"
The certificate is beeing issued fine. But the output I get from the command is the following:
Installing with Script... Script Scripts\ImportJKS.ps1 starting with parameters -pfxfile C:\ProgramData\win-acme\ Certificates\q4Ak1gIGk0OwGfvT2-l-nA-main-db0728dc4eb62a86a878f09789ac8bf8e1ff6565-temp.pfx -pfxpassword ******** -keystorefile D:\Certificates\keystore.jks -keystorepassword password123 -keystorekeypassword password1234 Script error: Missing closing '}' in statement block or type definition. Script error: + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException Script error: + FullyQualifiedErrorId : MissingEndCurlyBrace Script finished with exit code 1
I have also tried to run the script according to the sample usage in the importJKS.ps1 script
wacs.exe --target manual --host host.dom.tld --store none --installation script --script "Scripts\ImportJKS.ps1" --scriptparameters "-pfxfile \"{CacheFile}\" -pfxpassword {CachePassword} -keystorefile \"D:\Certificates\keystore.jks\" -keystorepassword 12345 -keystorekeypassword 12345"
However that fails with the following error:
Unknown argument --p, use --help to get a list of possible arguments.
The thing is, I have not changed anything in the importJKS.ps1 script.
What am I doing wrong here?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions