SOLVED

Which Cert is using what - Exchange onprem 2013

%3CLINGO-SUB%20id%3D%22lingo-sub-1692515%22%20slang%3D%22en-US%22%3EWhich%20Cert%20is%20using%20what%20-%20Exchange%20onprem%202013%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1692515%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Exchange%20Community%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20my%20Exchange-OnPrem%202013%20server%2C%20I%20got%20Alerts%20regarding%20two%20certificates%20have%20expired%20and%20one%20certificate%20is%20about%20to%20expire.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20went%20to%20%3CSTRONG%3E%3CEM%3EExchange%20Admin%20Center%20--%26gt%3B%20Servers%20--%26gt%3B%20Certificates%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EI%20can%20see%20those%20certs%20plus%20others%20along%20with%20their%20status%20and%20expire%20date.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3EI%20dont%20know%20what%20these%20certs%20are%20for%20as%20I%20took%20over%20recently%20on%20this%20role.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI%20was%20wondering%20if%20there%20is%20any%20function%20or%20cmdlet%20to%20show%20me%20which%20cert%20is%20using%20what%20and%20where%20each%20of%20them%20are%20being%20used.%20Is%20there%20any%20way%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20in%20advance%20for%20your%20help.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1692515%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ehybrid%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1694457%22%20slang%3D%22en-US%22%3ERe%3A%20Which%20Cert%20is%20using%20what%20-%20Exchange%20onprem%202013%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1694457%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F132157%22%20target%3D%22_blank%22%3E%40Ali%20Fadavinia%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20the%20following%20command%3C%2FP%3E%3CP%3EGet-ExchangeCertificate%3C%2FP%3E%3CP%3Eand%20you%20will%20see%20each%20certificate%20with%20which%20service%20is%20bound%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.alitajran.com%2Fget-exchange-certificate-with-powershell%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.alitajran.com%2Fget-exchange-certificate-with-powershell%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1694970%22%20slang%3D%22en-US%22%3ERe%3A%20Which%20Cert%20is%20using%20what%20-%20Exchange%20onprem%202013%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1694970%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F790105%22%20target%3D%22_blank%22%3E%40farismalaeb%3C%2FA%3E%26nbsp%3BThanks%20for%20sharing%20the%20knowledge.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20ran%20the%20command%20with%20different%20options%20but%20services%20shown%20there%20is%20blank%20via%20powerShell%20but%20it%20shows%20services%20in%20the%20UI.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi Exchange Community,

 

On my Exchange-OnPrem 2013 server, I got Alerts regarding two certificates have expired and one certificate is about to expire.

 

I went to Exchange Admin Center --> Servers --> Certificates:

I can see those certs plus others along with their status and expire date.

 

I dont know what these certs are for as I took over recently on this role.
 
I was wondering if there is any function or cmdlet to show me which cert is using what and where each of them are being used. Is there any way?

Thanks in advance for your help.
9 Replies

@Ali Fadavinia 

You can use the following command

Get-ExchangeCertificate

and you will see each certificate with which service is bound

https://www.alitajran.com/get-exchange-certificate-with-powershell/

@farismalaeb Thanks for sharing the knowledge.

I ran the command with different options but services shown there is blank via powerShell but it shows services in the UI.

can you please share a screenshot.

@farismalaeb Sure

best response confirmed by Ali Fadavinia (Contributor)
Solution

@Ali Fadavinia 

I try it in my exchange 2016 and the service shows None if the certificate is not assign with any service.

I also got some warning in my exchange regarding some expired certificate, but I ignore them as these certificate are not assign with any service or has been replaced with another new certificate.

run the following command for more infomatino and post the all result back

 

Get-ExchangeCertificate |where {($_.Services -notlike "none") -and ($_.Services -notlike $null)}| select thumbprint,Services,Subject

 

This command will show you a list of all certificate and the assigned services with them.

 

@farismalaeb Thanks for your help on this.

 

I ran the command but it did give me back any results. 

 

@Ali Fadavinia 

this seems silly thing from powershell,

If you use ISE to connect to exchange, the result for Service will be null,

try to use the Exchange Server Manamgement Shell in the server it self ( the Powershell that come with exchange) and run the command, you will see that the result are available.

Let me know the update.

Thanks

 

You are right, it is working now in the Exchange Server Management Shell in the server itself.

But when I remote connect to the server via powershell it did not work.

Thanks you!

@Ali Fadavinia 

Thanks for the response.

Just to add extra details here,

I notice when i get the member Get-Member of Get-Certificate the services is not listed as a property, actually its not listed at all, and this is why you will get an empty value ($Null).

I will need to see whats going, maybe Exchange mgmt shell load more library before connect.