Quick PowerShell Stuff 4 – Certificates

In the past two days I’ve produced a couple of scripts designed to reveal tidbits about your Exchange Server, like
serial numbers and postmaster addresses. In that vein, I’ve produced a script that will reveal information your servers Exchange certificates.

#
# Exchange server certificates script
#
# This script will list the server name, domains involved, self-signed or not, services assigned to, states, CA issuer
#


# first we need tp export the Exchange server names to a CSV file

get-exchangeserver | export-csv c:\scripts\exchservers.csv

# Now we need to loop through this to find list all certificates
$servers = import-csv c:\scripts\exchservers.csv

foreach ($line in $servers) {
$server = $line.name
Get-ExchangeCertificate -server mailtrading04 |ft certificatedomains,isselfsigned,services,status,issuer -auto
}

This script does not produce pretty output, but it can be used to help you gather certification information on your server. The best use of this script it to make sure your certificates match the URLs on the Exchange servers.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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