Commands › Exchange Online

Import-ExchangeCertificate

Exchange Online ExchangeOnlineManagement Import-*

Import certificates on Exchange servers. You use this cmdlet to install certificates that were exported from other servers, and to complete pending certification requests (also known as certificate signing requests or CSRs) from certification authorities (CAs).

Quick start script

# Import-ExchangeCertificate — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Import-ExchangeCertificate -FileData <Byte[]> -FileName <String> -Instance <String[]> | Format-List

# 3. Export for evidence / drift tracking
Import-ExchangeCertificate | Export-Clixml .\ExchangeCertificate-$(Get-Date -Format yyyyMMdd).xml

Syntax — 3 parameter sets

FileData

Import-ExchangeCertificate -FileData <Byte[]>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-FriendlyName <String>]
 [-Password <SecureString>]
 [-PrivateKeyExportable <Boolean>]
 [-Server <ServerIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

FileName

Import-ExchangeCertificate -Instance <String[]>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-FriendlyName <String>]
 [-Password <SecureString>]
 [-PrivateKeyExportable <Boolean>]
 [-Server <ServerIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Instance

Import-ExchangeCertificate -FileName <String>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-FriendlyName <String>]
 [-Password <SecureString>]
 [-PrivateKeyExportable <Boolean>]
 [-Server <ServerIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-FileData Byte[] yes The FileData parameter specifies the contents of the certificate file that you want to import.
-FileName String yes **Note**: This parameter was removed from Exchange 2016 and Exchange 2019 by the [2022 H1 Cumulative...
-Instance String[] yes This parameter is deprecated and no longer used.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-FriendlyName String The FriendlyName parameter specifies a friendly name for the certificate. The value must be less than 64 characters.
-Password SecureString The Password parameter specifies the password that's required to import the certificate.
-PrivateKeyExportable Boolean The PrivateKeyExportable parameter specifies whether the certificate has an exportable private key and controls whether you can export the certificate from this server. Valid values are:
-Server ServerIdParameter The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.