BizTalk, Certificates and PowerShell.

Posted: October 11, 2010 in PowerShell
Tags: , ,

About a month ago we had a problem in migrating an old BizTalk application from development environment to quality environment. This application sign the incoming messages, base in the certificate installed in the machine, and put this signature in one record in the body of the message, all of this is execute in the received pipeline. The certificated is load base on the thumbprint.

When we attempted to test the application we get the following error:

Cannot find a local machine certificate with the thumbprint: 5693ae76acfe33325bd6e1f05f38a9941892cb69 cannot be found.”

Because this was an old application and lack of documentation, our problem was in knowing what and where the certificate was installed.

Using MMC (Microsoft Management Console) we can see all the certificates installed in the machine, but we cannot search by thumbprint!!!😦

So I ask my friend José António Silva to show me the power of PowerShell to solve my annoying problem:


gci cert:\* -Recurse | ?{$_.Thumbprint -eq "5693ae76acfe33325bd6e1f05f38a9941892cb69"} | select Subject, PSPath}

Subject                                     PSPath
——-                                        ——
O=”… S A “, C=PT, CN=… SA      Microsoft.PowerShell.Security\Certificate::CurrentUser\R…
O=”… S A “, C=PT, CN=… SA      Microsoft.PowerShell.Security\Certificate::LocalMachine\…
O=”… S A “, C=PT, CN=… SA     Microsoft.PowerShell.Security\Certificate::LocalMachine\…


gci cert:\* -Recurse | ?{$_.Thumbprint -eq "5693ae76acfe33325bd6e1f05f38a9941892cb69"} | select PSParentPath


So now I know where is the certificated installed, and what was the certificate that I should install on quality environment.

Tags: BizTalk | PowerShell | Certificates

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s