Commands › Exchange Online

New-DkimSigningConfig

Exchange Online ExchangeOnlineManagement New-*

Create the DomainKeys Identified Mail (DKIM) signing policy settings for domains in a cloud-based organization.

Quick start script

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

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-DkimSigningConfig
$before | Format-List

# 3. Make the change (dry run first)
New-DkimSigningConfig -DomainName <SmtpDomainWithSubdomains> -Enabled <Boolean> -WhatIf
New-DkimSigningConfig -DomainName <SmtpDomainWithSubdomains> -Enabled <Boolean>

# 4. Verify and diff
$after = Get-DkimSigningConfig
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

New-DkimSigningConfig [-DomainName] <SmtpDomainWithSubdomains> [-Enabled] <Boolean>
 [-AdminDisplayName <String>]
 [-BodyCanonicalization <CanonicalizationType>]
 [-Confirm]
 [-HeaderCanonicalization <CanonicalizationType>]
 [-KeySize <UInt16>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-DomainName SmtpDomainWithSubdomains yes The DomainName parameter specifies the domain in your organization that you want to enable DKIM message signing for.
-Enabled Boolean yes The Enabled parameter specifies whether the policy is enabled. Valid values are:
-AdminDisplayName String The AdminDisplayName parameter specifies a description for the policy. If the value contains spaces, enclose the value in quotation marks (").
-BodyCanonicalization CanonicalizationType The BodyCanonicalization parameter specifies the canonicalization algorithm that's used to create and verify the message body part of the DKIM signature. This value effectively controls the sensitivity of DKIM to...
-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.
-HeaderCanonicalization CanonicalizationType The HeaderCanonicalization parameter specifies the canonicalization algorithm that's used to create and verify the message header part of the DKIM signature. This value effectively controls the sensitivity of DKIM to...
-KeySize UInt16 The KeySize parameter specifies the size in bits of the public key that's used in the DKIM signing policy. Valid values are:
-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.