Dela via


New-JournalRule

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the New-JournalRule cmdlet to create a new journal rule on a computer that has the Microsoft Exchange Server 2007 Hub Transport server role installed.

Syntax

New-JournalRule -Name <String> -JournalEmailAddress <RecipientIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Enabled <$true | $false>] [-Recipient <Nullable>] [-Scope <Internal | External | Global>] [-TemplateInstance <PSObject>] [-WhatIf [<SwitchParameter>]]

Detailed Description

The New-JournalRule cmdlet creates a journal rule for use with the Journaling agent.

By default, new journal rules are enabled unless the Enabled parameter is set to $False. For more information about how to enable a new journal rule that was created in a disabled state, see Enable-JournalRule.

To run the New-JournalRule cmdlet, the account you use must be delegated the following:

  • Exchange Organization Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

JournalEmailAddress

Required

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter

Use this parameter to specify a recipient object to which journal reports are sent.

Name

Required

System.String

Use this parameter to specify the name of the journal rule. The name of the rule can be up to 64 characters long.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter on the command.

Enabled

Optional

System.Boolean

Use this parameter to specify whether the journal rule is enabled or disabled. If the rule is disabled, it is not applied to any e-mail messages. The default value is $False.

Recipient

Optional

System.Nullable

Use this parameter to specify 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 sent to or from a recipient are journaled.

Scope

Optional

Microsoft.Exchange.MessagingPolicies.Journaling.JournalRuleScope

Use this parameter to specify the e-mail messages to which the journal rule is applied. Valid values for this parameter are as follows:

  • Global   Global rules process all e-mail messages that pass through a Hub Transport server. This includes e-mail messages that were already processed by the external and internal rules. The default value is Global.

  • Internal   Internal rules process e-mail messages that are sent and received by recipients in the Exchange Server 2007 organization.

  • External   External rules process e-mail messages that are sent to recipients or from senders outside the Exchange Server 2007 organization.

TemplateInstance

Optional

System.Management.Automation.PSObject

When an existing object is supplied to this parameter, the command uses the configuration of that object to create an identical copy of the object on a local or target server. For more information, see Templates.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

Example

The following example shows how to create a new enabled journal rule. The rule applies to all e-mail messages that pass through the Hub Transport server and contain at least one recipient or sender who is a member of the brokers@contoso.com distribution list.

New-JournalRule -Name "Brokerage Communications" -JournalEmailAddress "Brokers Journal Mailbox" -Scope Global -Recipient brokers@contoso.com -Enabled $True