How to export/import certificates on Exchange 2013 Shell
- Category : SSL Installation
- Posted on : May 15, 2020
- Views : 1,514
- By : HostSEO
The same certificate can be used on different Exchange servers by using the export/import process. After installing the certificate on the server from which the certificate request was initially generated, use the Shell command lines to export the installed certificate from one server and import it to another one.
Export
You may export the certificate from the Exchange server using the certificate’s domain name or its thumbprint.
1) Using Domain name:
Get-ExchangeCertificate -DomainName “domain_name.com” | Export-ExchangeCertificate
-BinaryEncoded:$true -Password (Get-Credential).password
After clicking Enter, you will be prompted to enter your username and password. You can type anything for the username as this field does not matter here. However, you should remember the password since you will need it to import or convert the certificate into other formats. If this password is lost or forgotten, it cannot be recovered. In this case, you would need to export the certificate again to a new file with new credentials.
2) Using Thumbprint:
Export-ExchangeCertificate -ThumbPrint -BinaryEncoded:$true -Password (Get-Credential).password
The certificate thumbprint can be obtained in several different ways. For example, if you have installed the certificate on any server you can access from your Shell, you have already used the thumbprint during the certificate installation process.
Otherwise, you can open the file with the certificate text by cutting and pasting the text in this decoder and looking for the “SHA1 Fingerprint” field. If you use your certificate’s .crt file which has the -----BEGIN CERTIFICATE----- header, the output will show the “SHA1 Fingerprint”. If you decode the .p7b or .cer file, the tool will show a message that the certificate is in PKCS#7 format and display the PEM text of the certificate with Begin and End headers on the page. You will need to decode the PEM text once again to see the thumbprint/SHA1 fingerprint, which are the same.
Once you have entered the password which encrypts the certificate, you need to specify the path to the file where the exported certificate should be saved:
Set-Content -Path “c:\file_name.pfx” -Value $file.FileData -Encoding Byte
Import
Before importing, the certificate .pfx file should be saved on your computer. You can also import the certificate if it was created on another machine as long as you have saved it in the .pfx format and have the correct password.
Use the following command:
Import-ExchangeCertificate -FileData ([byte[]](Get-Content -Path path/to/certificate.pfx -Encoding Byte -ReadCount 0)) -Password (Get-Credential).password -Server
The “-Server ” section helps import the certificate to a particular server if you have several of them on one machine. In our example, this part is omitted since only one server was enabled initially.
The system asks for the username and password. You can enter any value in the username field as it is not relevant here. However, the password should match the one used for creating the .pfx file (during the certificate export or conversion).
If the password matches, the certificate will be imported onto the server. The Shell displays its thumbprint and details.
To assign the certificate to the Exchange services, use this guide.
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu