power shell Script to get certificate "SMTP O365"

Mohammad Al Amoudi 0 Reputation points
2023-12-03T10:40:10.3833333+00:00

Hello,
I need to show Office365 SMTP certificate in power shell, I was tried below Script but get error.

"s_client -showcerts -starttls smtp -crlf -connect smtp.office365.com:587"

Please help me to do that.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2023-12-03T18:47:49.8966667+00:00

    What error do you get? Where did you get this "s_client" script?

    Are you trying to run the Openssl application? That has nothing to do with Powershell.

    https://www.misterpki.com/openssl-s-client/

    I used the Digicert utility to display the cert.

    https://www.digicert.com/support/tools/certificate-utility-for-windows

    User's image


  2. Mohammad Al Amoudi 0 Reputation points
    2023-12-04T07:33:10.5333333+00:00

    @Rich Matheisen @MotoX80

    Thank you so much, it's work after installed Openssl.exe.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.