Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Exchange / Save Sent Items in Shared Mailbox on Exchange (Microsoft 365)

April 3, 2023 ExchangeMicrosoft 365PowerShell

Save Sent Items in Shared Mailbox on Exchange (Microsoft 365)

You can allow users to send e-mails on behalf of the shared mailbox in Exchange Server and Microsoft 365 (Exchange Online). However, such an e-mail, once it has been sent, will not be saved in the Sent Items folder of the shared (owner’s) mailbox. It is only stored in your personal mailbox’s Sent Items folder. This is very inconvenient when several users are working with a single shared mailbox, as it is not clear who has replied to the incoming e-mail or sent the specific message.

Let’s assume your account has been granted Send as and/or Send on behalf permissions to the HelpDesk shared mailbox. You need to have copies of all e-mails that you (or other delegates) have sent on behalf of the shared mailbox available in its Sent Items folder.

Connect to your on-premises Exchange Server using PowerShell:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://mun-mbex1.woshub.com/PowerShell/ -Authentication Kerberos -Credential
Import-PSSession $Session

Or connect to Microsoft 365 using the Exchange Online PowerShell (EXOv2) module:

Connect-ExchangeOnline

Run the following command to automatically save e-mail items, sent via Send to a Sent Items folder in a shared mailbox:

Set-Mailbox helpdesk -MessageCopyForSentAsEnabled $True

You can also save messages sent using Send On Behalf.

Set-Mailbox helpdesk -MessageCopyForSendOnBehalfEnabled $True

Check the current settings:

Get-Mailbox helpdesk | select MessageCopyForSentAsEnabled, MessageCopyForSendOnBehalfEnabled

PowerShell: enable mailbox options MessageCopyForSentAsEnabled and MessageCopyForSendOnBehalfEnabled

This cmdlet is available in Exchange Server 2013 CU9/2016/2019 and Exchange Online.

You can enable these options for all shared mailboxes:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'SharedMailbox')} | Set-Mailbox -MessageCopyForSendOnBehalfEnabled $true -MessageCopyForSentAsEnabled $true

You can also enable or disable this option using the Microsoft 365 Admin Center:

  1. Sign in to the Microsoft 365 Admin Center;
  2. Navigate to Teams and Groups -> Shared mailboxes;
  3. Select the shared mailbox you want to configure;
  4. Locate the Sent Items section in the mailbox settings and click Edit;
  5. There are two options available here:
    Copy items sent as this mailbox
    Copy items sent on behalf of this mailbox

    microsoft 365: enable copy sent items for shared mailbox

  6. Enable the options you want and save the changes.

It is possible to use the MessageCopyForSendOnBehalfEnabled and MessageCopyForSentAsEnabled parameters to save only copy messages sent on behalf of the shared mailbox. If you want to save messages sent on behalf of a common user mailbox (or for Exchange Server 2010 mailboxes), you need to enable the Outlook registry option DelegateSentItemsStyle (or convert a user mailbox to a shared mailbox).

Value name: DelegateSentItemsStyle
Value Type: REG_DWORD
Value: 1
  • Outlook 2016/2019/2021/365:
    HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Preferences
  • Outlook 2013:
    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Preferences
  • Outlook 2010:
    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences
The DelegateSentItemsStyle parameter allows you to save messages sent on behalf of other mailboxes but is only effective on the current computer for the configured Outlook profile. You can deploy this registry option on domain computers with a GPO.

You can use the Set-MailboxSentItemsConfiguration cmdlet in order to change the sent items retention settings for mailboxes on Exchange Server 2010 SP 2 Update Rollup 4:

Set-MailboxSentItemsConfiguration helpdesk -SendAsItemsCopiedTo Sender -SendOnBehalfOfItemsCopiedTo SenderAndFrom

For this feature to work, Outlook must be in Online or Cached Exchange mode. The DelegateSentItemsStyle registry option must be disabled.

Now, when you send an e-mail on behalf of another mailbox, it will be saved in the Sent Items folder of the owner’s mailbox.

Outlook: save copy of sent messages in the owner mailbox

If the e-mails still do not appear in the Sent Items folder of the shared mailbox, check that it is configured to only receive emails from authenticated users:

Get-Mailbox helpdesk | fl *auth*

RequireSenderAuthenticationEnabled : True

You can change this behavior like this:

Set-Mailbox helpdesk -RequireSenderAuthenticationEnabled $false

0 comment
0
Facebook Twitter Google + Pinterest
previous post
How to Run Program without Admin Privileges and Bypass UAC Prompt
next post
Import-CSV: Reading CSV Files with PowerShell

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

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

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • FAQ: Licensing Microsoft Exchange Server 2019/2016
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
  • Fix: Microsoft Outlook Search Not Working on Windows 10/11
  • Managing Calendar Permissions on Exchange Server and Microsoft 365
  • Configure Auto-Reply (Out of Office) Message in Exchange and Microsoft 365
Footer Logo

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


Back To Top