Welcome to UnableTo.com, where you can state any issue that you are unable to perform and receive answers from other members of the community.

Categories

0 votes

I have been using send-mailmessage to attempt to use powershell to send an email through our exchange server but keep receiving the error "send-mailmessage : The remote certificate is invalid according to the validation procedure."  I have tried to install the certificate on the local machine, but this is not working. I am using the following powershell cmdlet

send-mailmessage -to "Someone <user@domain.com>" -from "ME<anotheruser@somedomain.com>" -subject "email1" -body "this is body1" -smtpserver "mail.somedomain.com" -credential domain\user -UseSSL

asked by (2.5k points)

1 Answer

0 votes
Ensure that your server name matches the one in exchange. To find this name in exchange 2013 navigate to ECP > Servers and select your server and click edit, Then click Outlook Anywhere and use the internal host name.

Mine ended up being mailservername.domain.local
answered by (430 points)
...