Exchange - Handy shell commands

For debugging issues with SSL and related problems, some quick tricks are available for the Exchange Management Shell. It's often required to use the certificate's thumbprint in the Exchange Management Shell commands, you can retrieve that by opening your certificate locally (double click), and scrolling to the "thumbprint" field in the details tab.

Asign all services to a certificate

 Enable-ExchangeCertificate -Thumbprint 0123456789ABCDEF0123456789ABCDEF01234567-Services POP,IMAP,SMTP,IIS

Disable all services for a certificate

 Enable-ExchangeCertificate -Services None -Thumbprint 0123456789ABCDEF0123456789ABCDEF01234567

Remove a certificate

 Remove-ExchangeCertificate -Thumbprint 0123456789ABCDEF0123456789ABCDEF01234567

List the binding for all certificates

 Get-ExchangeCertificate | select thumbprint,services,notafter,subject,certificatedomains | where {$_.Services -match "SMTP"} | fl

This command will generate the following output per certificate;

 Thumbprint         : 0123456789ABCDEF0123456789ABCDEF01234567
 Services           : IMAP, POP, IIS, SMTP
 NotAfter           : 4/10/2015 1:59:59 AM
 Subject            : CN=mail.domain.tld
 CertificateDomains : {mail.domain.tld,autodiscover.domain.tld}

SSLCheck

Our SSLCheck will examine your website's root and intermediate certificates for correctness and report any potential issues