Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Exchange / Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

March 15, 2024

Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

In Exchange Server and Exchange Online (Microsoft 365), you can enable email forwarding at the mailbox level (configured by the administrator using the ForwardingAddress attribute), through mailbox Inbox rules, or directly from Outlook (users can do this themselves through the ForwardingSMTPAddress attribute).

Contents:
  • Enable/Disable Forwarding on a User Mailbox with Exchange Admin Center
  • Manage Email Forwarding for an Exchange Mailbox with PowerShell

Enable/Disable Forwarding on a User Mailbox with Exchange Admin Center

You can enable/disable email forwarding for a mailbox in the Exchange Admin Center:

You can enable and disable email forwarding for a user mailbox through the Exchange Admin Center:

  1. Sign in to the EAC web interface;
  2. Go to Recipients -> select a mailbox -> Edit;
  3. Click the Mailbox Features -> scroll down to Mail Flow -> View details;
  4. Check the Enable forwarding option and select a recipient user mailbox to which you would like all incoming emails to be forwarded;;
  5. You can also enable the option Deliver message to the both forwarding address and mailbox. enable forwarding address in Exchange

Manage Email Forwarding for an Exchange Mailbox with PowerShell

My preference is to use PowerShell to enable or disable email forwarding for Exchange mailboxes.

There are two attributes in Exchange that you can use to configure forwarding for a mailbox:

  • ForwardingAddress
  • ForwardingSmtpAddress

The ForwardingSmtpAddress attribute allows to enable email forwarding to any internal or external SMTP address. The Outlook/OWA GUI allows users to configure the target recipient address in this attribute. If an external SMTP address is specified here, such forwarding will only work for trusted external domains. Your Exchange administrator configures the list of trusted domains (Remote Domains) and whether you can automatically forward e-mail to them.

Get-RemoteDomain | fl DomainName,AutoForwardEnabled

Enable email forwarding in Outlook

Learn how to enable mail forwarding to external SMTP addresses in Microsoft 365/Exchange Online.

The ForwardingAddress attribute allows an administrator to configure email forwarding to any mail-enabled object in the Exchange organization. Users cannot directly change the value of this attribute.

Connect to your Exchange organization using PowerShell:

  • If you are using an on-premises Exchange Server, connect to it using the PowerShell commands:
    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://mun-exch1.woshub.com/PowerShell/ -Authentication Kerberos -Credential $UserCredential
  • You can use the Exchange Online PowerShell module to connect to a Microsoft 365 tenant:
    Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress $true
You can use certificate-based authentication to connect Exchange Online/Microsoft 365.

To enable automatic e-mail forwarding to another mailbox in your organization, run the command below:

Set-Mailbox [email protected] -ForwardingAddress [email protected] -DeliverToMailboxAndForward $true

In this example, all emails sent to h.werner will be automatically forwarded to the maxadm mailbox. The DeliverToMailboxAndForward option indicates that an e-mail copy will be saved in the original recipient’s mailbox. If you set DeliverToMailboxAndForward $false, the emails will not be delivered to the recipient’s original mailbox.

You can check whether email forwarding is enabled for a specific mailbox:

Get-Mailbox -Identity [email protected] |fl ForwardingAddress, ForwardingSmtpAddress, DeliverToMailboxAndForward

Get-Mailbox forwardingadress in Exchange with PowerShell

To disable automatic forwarding:

Set-Mailbox -Identity [email protected] -DeliverToMailboxAndForward $False -ForwardingAddress $null -ForwardingSmtpAddress $null

To find all mailboxes with automatic forwarding enabled in an organization:

Get-Mailbox -ResultSize Unlimited -Filter "ForwardingAddress -like '*' -or ForwardingSmtpAddress -like '*'" | Select-Object Name,ForwardingAddress,ForwardingSmtpAddress

List Exchange mailboxes with a forward enabled

In addition to auto-forwarding, you can configure auto-reply rules (Out of Office) for an Exchange mailbox.

If both the ForwardingAddress and ForwardingSMTPAddress attributes are configured for a mailbox, the ForwardingSMTPAddress value is ignored as less prioritized.

If you want to set up a mail forwarding to an external SMTP address using the ForwardingAddress attribute, you must first create a contact for such an address:

New-MailContact -Name "ext. Heinz Werner" -ExternalEmailAddress "[email protected]"

Then set up an internal email address for the contact:

Set-MailContact "ext. Heinz Werner" -EmailAddresses "SMTP:ext_h.werner @woshub.com,[email protected] "

Then use the Set-Mailbox cmdlet to configure forwarding to the external contact.

In addition to mailbox-level forwarding, users and administrators can configure Exchange Inbox rules (can be configured from within Outlook) to forward email.

For example, an administrator can create a mailbox rule to automatically forward all e-mails with the specific subject to a different mailbox:

New-InboxRule -Name ForwardPowerAlertstoHelpdesk -Mailbox h.werner -SubjectContainsWords "DC Power Alert" -ForwardTo "Helpdesk"

You can list all the mail forwarding rules that have been configured at the Outlook level for all the user mailboxes in the organization:

$mailboxes=get-mailbox –resultSize unlimited
$rules = $mailboxes | foreach { get-inboxRule –mailbox $_.alias }
$rules | where { ( $_.forwardAsAttachmentTo –ne $NULL ) –or ( $_.forwardTo –ne $NULL ) –or ( $_.redirectTo –ne $NULL ) }  | ft name, MailboxOwnerId, ForwardTo, Description

You can configure mail forwarding rules not only for personal user mailboxes but also for shared Exchange mailboxes. You don’t need to grant yourself access to the mailbox when you create a mail forwarding rule from PowerShell.
0 comment
1
Facebook Twitter Google + Pinterest
Azure and Microsoft 365ExchangePowerShell
previous post
How to View and Change BIOS (UEFI) Settings with PowerShell
next post
Installing Language Pack in Windows 10/11 with PowerShell

Related Reading

How to Block Sender Domain or Email Address...

March 17, 2024

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

March 17, 2024

How to Manually Configure Exchange or Microsoft 365...

March 17, 2024

Automatic Outlook User Profile Configuration with ZeroConfigExchange

May 21, 2024

Send Emails with Microsoft Graph API and PowerShell

March 17, 2024

How to Enable Maintenance Mode on Exchange Server

March 12, 2024

Configure Auto-Reply (Out of Office) Message in Exchange...

March 15, 2024

Convert a User Mailbox to a Shared in...

March 15, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Configuring Windows Protected Print Mode (WPP)

    May 19, 2025
  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • Checking User Sign-in Logs in Entra ID (Microsoft 365)
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
  • Configuring Password Policy in Microsoft Entra ID
  • Blank Sign-in Screen in Office 365 Apps (Outlook, Teams, etc.)
  • Removing Built-in Teams Chat in Windows 11
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top