Skip to content

Instantly share code, notes, and snippets.

@Celoxocis
Last active May 8, 2018 07:21
Show Gist options
  • Save Celoxocis/1ce198ea464d7329cec720acf6792a82 to your computer and use it in GitHub Desktop.
Save Celoxocis/1ce198ea464d7329cec720acf6792a82 to your computer and use it in GitHub Desktop.
# works on exchange 2013-2016
Get-ExchangeCertificate
Export-ExchangeCertificate -Thumbprint XYZ -BinaryEncoded:$true -Path c:\certificates\export.pfx -Password:(Get-Credential).password
# Doesn't work on exchange 2010
# for exchange 2010 use this
https://practical365.com/exchange-server/export-an-exchange-server-2010-certificate-to-exchange-2003/
Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path c:\certificates\ExportedCert.pfx -Encoding byte -ReadCount 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment