Exchange deployment error

Hi,

I’m using windows server 2012 r2 and exchange 2016.

Installed the app, set it up for exchange and everything is working fine, the cert is downloaded and applied but I get this errors

2020-06-16 11:01:11.780 +02:00 [INF] Performing Post-Request (Deployment) Tasks..
2020-06-16 11:01:11.781 +02:00 [INF] Task [Deploy to Exchange] :: Task is enabled and primary request was successful.
2020-06-16 11:01:11.791 +02:00 [INF] Executing command via PowerShell
2020-06-16 11:01:23.357 +02:00 [ERR] Write-Host: A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows.
At line:13 char:1
+ Write-Host "Enabling Certificate for Exchange services.."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Write-Host: A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows.
At line:18 char:1
+ Write-Host "Certificate set OK for services."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2020-06-16 11:01:23.357 +02:00 [INF] Deploy to Exchange :: Write-Host: A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows.
At line:13 char:1
+ Write-Host "Enabling Certificate for Exchange services.."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Write-Host: A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows.
At line:18 char:1
+ Write-Host "Certificate set OK for services."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2020-06-16 11:01:23.358 +02:00 [INF] Deployment Tasks did not complete successfully.

Can anyone help?

Thanks.

Hi,

Is it possible you have an older version of PowerShell or Windows Management Framework installed? It needs to be v5 or higher and v5.1 (of WMF) is the version currently supported by Microsoft.

https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/overview?view=powershell-7

If you can’t do that, as an alternative to using the built in Deployment Task you could use a Powershell Deployment Task and run (or adapt) the following script:

# This is an example script and it will be overwritten when the next update is installed. 
# To use this script copy it to another location and modify as required

# This script enables the use of the newly retrieved and stored certificate with common Exchange services
# For more script info see https://docs.certifytheweb.com/docs/script-hooks.html

param($result)

# enable powershell snap-in for Exchange 2010 upwards
Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.E2010

# tell Exchange which services to use this certificate for, force accept certificate to avoid command line prompt
Enable-ExchangeCertificate -Thumbprint $result.ManagedItem.CertificateThumbprintHash -Services POP,IMAP,SMTP,IIS -Force

That was it.

Thanks a lot webprofusion!

1 Like