Commands › Exchange Online

New-JournalRule

Exchange Online ExchangeOnlineManagement New-*

Create a journal rule in your organization.

Quick start script

# New-JournalRule — 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-JournalRule
$before | Format-List

# 3. Make the change (dry run first)
New-JournalRule -Name <String> -JournalEmailAddress <RecipientIdParameter> -WhatIf
New-JournalRule -Name <String> -JournalEmailAddress <RecipientIdParameter>

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

Syntax

New-JournalRule -Name <String> -JournalEmailAddress <RecipientIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-Enabled <Boolean>]
 [-Recipient <SmtpAddress>]
 [-Scope <JournalRuleScope>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the name of the journal rule. The name of the rule can be up to 64 characters long.
-JournalEmailAddress RecipientIdParameter yes The JournalEmailAddress parameter specifies a recipient object to which journal reports are sent. You can use any value that uniquely identifies the recipient. 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 This parameter is available only in on-premises Exchange.
-Enabled Boolean The Enabled parameter specifies whether the journal rule is enabled or disabled. If the rule is disabled, it isn't applied to any email messages. The default value is $false.
-Recipient SmtpAddress The Recipient parameter specifies the SMTP address of a mailbox, contact, or distribution group to journal. If you specify a distribution group, all recipients in that distribution group are journaled. All messages...
-Scope JournalRuleScope The Scope parameter specifies the scope of email messages to which the journal rule is applied. Valid values for this parameter are as follows:
-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.