-
-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script parameters from command line not parsed properly #1215
Comments
Try running in |
I have Powershell Version 5.1.14409.1005 Full log with --verbose C:\WACS>wacs.exe --test --verbose --target manual --host mail.antonar.by,autodis [INFO] A simple Windows ACMEv2 client (WACS) [WARN] Overwriting previously created renewal Where can I see what is happening in powershell? TY for your help |
Hi Walkman78, I ran into this same issue. I decided to run the ImportExchange.ps1 interactively by passing it the same strings that pop up in the Info window while initially running manual wacs.exe setup. I started a new powershell session and changed to the Scripts directory of win-acme and ran I cancelled and ran ImportExchange.ps1 with no parameters. I pasted in the certthumbprint and services manually. Once I hit enter on the services the script continued and the certificate installed successfully. Long story short, I'm wondering if it's possible for you to run the manual wacs.exe setup, but delete all of the scriptparameters except for the first two and see if it runs successfully for you? IE And see if that works? |
Hi NibblesJabroni, The script does not work through wacs even with minimal parameters. Forced work over a powershell works well. |
I had a user with a similar problem that got solved by installing the latest version of Powershell (they were on 2.0) but I'm stumped to see it happen on 5.1 without any output from the process. The output is supposed to show in VERB messages and it should appear in the Windows Event Viewer as well. Would you mind trying to run a very simple .ps1 that only prints Hello World and see if that works? I'm curious if this is something fundamental to Powershell like before, or something specific to this script. |
I run wacs.exe --test --verbose --target manual --host mail.antonar.by,autodiscover.antonar.by --installation script --script "./Scripts/test.ps1" here is a part of the log [INFO] Installing with Script... |
I think they use powershell.exe -nologo -noninteractive -windowStyle hidden |
My server is running Powershell 3.0.
The timestamp coincides with the console repeating
Until the 5 minute timeout is reached. I believe the issue is that the wacs.exe is not passing multiple parameters to the powershell script, it is passing all of the generated parameters as a single string to ImportExchange.ps1, which the script is interpreting as the FIRST positional parameter only. It is then stuck waiting for you to type in the rest of the required parameters. I have tried to get around this by removing the double-quotes on the parameters after Maybe someone can shed some light on how we can better pass the script parameters from wacs.exe to the powershell script? |
Maybe it's worth a shot to try the command line with (escaped) double
quotes instead of single quotes. Otherwise it's worth trying to do it via
interactive mode instead of the command line to bypass the command line
parser entirely. In any case I will investigate more closely next week.
…On Fri, Sep 20, 2019, 18:16 NibblesJabroni ***@***.***> wrote:
My server is running Powershell 3.0.
I believe the issue is how wacs.exe passes the parameters to the
powershell script. I re-ran the manual job from commandline but with
transcripts enabled on the system and I received this in the transcript log:
**********************
Windows PowerShell transcript start
Start time: 20190920090659
Username : DOMAIN\administrator
Machine : CONTOSO-EX1 (Microsoft Windows NT 6.1.7601 Service Pack 1)
**********************
cmdlet ImportExchange.ps1 at command pipeline position 1
Supply values for the following parameters:
ExchangeServices:
The timestamp coincides with the console repeating
[VERB] Waiting for process to finish...
Until the 5 minute timeout is reached.
I believe the issue is that the wacs.exe is not passing multiple
parameters to the powershell script, it is passing all of the generated
parameters as a single string to ImportExchange.ps1, which the script is
interpreting as the FIRST positional parameter only. It is then stuck
waiting for you to type in the rest of the required parameters.
I have tried to get around this by removing the double-quotes on the
parameters after --scriptparameters but that causes wacs.exe to lock up
even earlier in the process.
Maybe someone can shed some light on how we can better pass the script
parameters from wacs.exe to the powershell script?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1215>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACUKKXAXGLHRYPQK7L7B6FTQKTZOTANCNFSM4IXO5QLQ>
.
|
That did it! Escaping the double-quotes with So @Walkman78, change your command to:
|
hmm ... I try this week. |
Fixed in beta3 |
Version 2.0.10.444
IIS Version 8.5
Exchange 2013
Windows Server 2012 R2
The script does not work with Exchange 2013. I try wacs.exe --target manual --host mail.mydomain.com,autodiscover.mydomain.com --installation iis,script --installationsiteid 1 --script "./Scripts/ImportExchange.ps1" --scriptparameters "'{CertThumbprint}' 'IIS,SMTP,IMAP' '1' '{CacheFile}' '{CachePassword}' '{CertFriendlyName}'"
I receive a certificate in IIS but the script hangs for 5 minutes and fails with a timeout error. I need to use Enable-ExchangeCertuficate and etc...
The text was updated successfully, but these errors were encountered: