Office 365: Search for and Delete Email Messages
How to search for and delete email messages across Microsoft 365 mailboxes with PowerShell, updated for modern authentication and the 2025 purge changes.
How to let Exchange Online users send email from an alias or proxy address, using the admin centre or PowerShell with the current EXO V3 module.

A mailbox often has more than one address, such as a personal address plus info@ or an old domain kept as a proxy address. Users then want to reply from the address the customer actually wrote to. In Exchange Online you cannot send email from an alias out of the box, because the setting that allows it is off by default. Here is how I switched it on in 2022, and what has changed since.
Exchange Online has an organisation-wide setting called SendFromAliasEnabled. Until an administrator turns it on, users cannot send messages using their aliases (proxy addresses). Microsoft first released the feature as a public preview. It is now generally available, so it is fully supported.
The parameter exists only in the cloud service. On-premises Exchange does not have it.
This is the quickest route if you only manage one tenant.
admin.exchange.microsoft.com with an Exchange administrator account.My original method was to connect to Exchange Online and run one cmdlet:
Set-OrganizationConfig -SendFromAliasEnabled $true
That cmdlet and parameter are still current in Microsoft's Set-OrganizationConfig reference. What has changed is how you connect.
Update: Remote PowerShell for Exchange Online has been retired. REST API connections replaced it in October 2023. All tenants must now use the Exchange Online PowerShell V3 module with Connect-ExchangeOnline, without the -UseRPSSession parameter. Old scripts that build a remote session will no longer work.
The current steps are:
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com
Get-OrganizationConfig | Format-List SendFromAliasEnabled
Set-OrganizationConfig -SendFromAliasEnabled $true
Disconnect-ExchangeOnline -Confirm:$false
SendFromAliasEnabled : True:Get-OrganizationConfig | Format-List SendFromAliasEnabled
This setting changes nothing in mailbox data, but it applies to the whole organisation. Treat it as a tenant-wide change.
Set-OrganizationConfig -SendFromAliasEnabled $false.| Step | Done? |
|---|---|
| Current value recorded | ☐ |
Connected with Connect-ExchangeOnline (V3) |
☐ |
SendFromAliasEnabled set to True |
☐ |
| Waited up to 60 minutes, then tested externally | ☐ |
| Hybrid routing, shared mailboxes and rules reviewed | ☐ |
| SPF, DKIM and DMARC checked for alias domains | ☐ |
The core fix has not changed since 2022: it is one setting, either a toggle or one cmdlet. What has changed is the connection method, so update any old scripts to the V3 module. Test the hybrid and shared mailbox cases before you tell users the feature is ready.
📝 First written from my own work in 2022; updated and expanded in November 2026 with AI assistance, keeping my original fix. Spotted something wrong? Tell me.