Commands › Exchange Online

Update-SafeList

Exchange Online ExchangeOnlineManagement Update-*

Update the safelist aggregation data in Active Directory. Safelist aggregation data is used in the built-in anti-spam filtering in Microsoft Exchange. EdgeSync replicates safelist aggregation data to Edge Transport servers in the perimeter network.

Quick start script

# Update-SafeList — 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-SafeList
$before | Format-List

# 3. Make the change (dry run first)
Update-SafeList -Identity <MailboxIdParameter> -WhatIf
Update-SafeList -Identity <MailboxIdParameter>

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

Syntax

Update-SafeList [-Identity] <MailboxIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-EnsureJunkEmailRule]
 [-IncludeDomains]
 [-Type <UpdateType>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter specifies the mailbox from which you want to collect safelist aggregation data. You can use any value that uniquely identifies the mailbox. For example:
-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...
-EnsureJunkEmailRule SwitchParameter The EnsureJunkEmailRule switch forces the junk email rule to be turned on for the mailbox if the rule isn't turned on already. You don't need to specify a value with this switch.
-IncludeDomains SwitchParameter The IncludeDomains switch specifies whether to include the sender domains specified by users in Outlook in the safelist aggregation data. You don't need to specify a value with this switch.
-Type UpdateType The Type parameter specifies which user-generated list is updated to the user object. Valid values for this parameter are SafeSenders, SafeRecipients, and Both. The default value is SafeSenders.
-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.