IIS 8-10: PFX Export
Learn how to export an SSL/TLS certificate from IIS 8, 8.5, and 10 to a PFX backup file using MMC, certlm.msc, or PowerShell. Covers Windows Server 2012 to 2025.
Overview
This guide demonstrates how to export an installed SSL/TLS certificate from IIS 8, 8.5, or 10 into a PFX file (PKCS#12). Exporting to PFX is necessary when you need to:
- Create a backup of the certificate and its private key
- Migrate the certificate to a different server
- Import the certificate into another application (such as Exchange or ADFS)
Supported Versions
| IIS Version | Windows Server |
|---|---|
| IIS 8.0 | Windows Server 2012 |
| IIS 8.5 | Windows Server 2012 R2 |
| IIS 10.0 | Windows Server 2016, 2019, 2022, 2025 |
Prerequisites
- Administrator privileges on the server
- The certificate must have been installed with an exportable private key
Method 1: Export via MMC
- Press Windows + R, type
mmc.exeand click OK. - Select File → Add/Remove Snap-in.
- Select Certificates, click Add, then choose Computer account → Local computer. Click Finish and OK.
- Navigate to Certificates (Local Computer) → Personal → Certificates.
- Right-click the certificate you wish to export → All Tasks → Export.
- Select Yes, export the private key. Click Next.
- Select Personal Information Exchange - PKCS #12 (.PFX). Tick Include all certificates in the certification path if possible to ensure intermediate certificates are included. Click Next.
- Select Password and enter a strong password to secure the PFX file. Click Next.
- Choose a filename and path (e.g.
C:\backup\eksempel-dk-2026.pfx). Click Next and then Finish.
[Screenshot: MMC → Personal → Certificates → All Tasks → Export]
Method 2: Export via certlm.msc (Windows Server 2012+)
- Press Windows + R, type
certlm.mscand press Enter. - Navigate to Personal → Certificates.
- Right-click the certificate → All Tasks → Export.
- Follow the export wizard as described in Method 1.
Method 3: Export via PowerShell
# Find certifikatet
Get-ChildItem -Path Cert:\LocalMachine\My | Format-Table Subject, Thumbprint, NotAfter
# Eksporter til PFX
$cert = Get-ChildItem -Path Cert:\LocalMachine\My\THUMBPRINT_HER
$password = ConvertTo-SecureString -String "DitStaerkePassword" -AsPlainText -Force
Export-PfxCertificate -Cert $cert -FilePath "C:\backup\eksempel-dk-2026.pfx" -Password $password
Troubleshooting
- "Yes, export the private key" is greyed out: The private key was not marked as exportable when it was originally imported. You must re-import the original PFX file and ensure Mark this key as exportable is selected.
- "The export failed - the key is not exportable": This occurs for the same reason mentioned above.
Security
- Always use a strong password (minimum 16 characters) for PFX files.
- Ensure PFX files are deleted from temporary locations immediately after use.
- Store backup PFX files in a secure location, such as an encrypted drive or a password vault.
Strengthen your TLS security
Use IIS Crypto to easily configure secure TLS protocols and cipher suites on your Windows Server.
IIS Crypto TLS configuration guide