Exchange Powershell Script to output certificate information

Scenario:  You need to export specific certificate info for all Exchange 2013 Servers.  The script below will output to a txt file the server names along with the Thumbprint, NotAfter, Services, and Subject  properties.


$servers = Get-ExchangeServer  | Where AdminDisplayVersion -like *15*

$servers | %{

$Name = $_.Name
$Cert = Get-ExchangeCertificate -server $ | Where Subject -like *mail.* | FT Thumbprint, NotAfter, Services, Subject -autosize
Write-Host $
$name, $cert | Out-file C:certs.txt -append



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 )

Connecting to %s

%d bloggers like this: