Skip to content

Manage focused inbox in Microsoft 365 using PowerShell

The Focused Inbox will replace the Clutter feature in Outlook. It places your most important emails under the Focused tab and the rest in the Other tab. You can enable or disable the focused inbox feature. In this article, we will show how to manage the focused inbox in Microsoft 365 using PowerShell.

Focused Inbox feature

Outlook’s focused inbox helps you focus on the emails that matter most to you. It separates your inbox into two tabs, Focused and Other. Your most important emails appear under the Focused tab, and the rest are moved to the Other tab.

You will be informed about emails flowing to the Other tab, and you can switch between tabs anytime.

Transition from Clutter to Focused Inbox in Microsoft 365

Users can keep using the existing clutter folder if they turn off the focused inbox feature. You can always Manage Microsoft 365 clutter using PowerShell.

Once a user mailbox user enables the focused inbox feature, the emails will be split between the Focused and Other tabs. Messages won’t be moved to the clutter folder anymore because the emails will go to the Other tab.

Connect to Exchange Online

To be able to run the PowerShell commands specified in this article, you will need to Connect to Exchange Online PowerShell.

Start Windows PowerShell as administrator and run the cmdlet Connect-ExchangeOnline.

Connect-ExchangeOnline

1. Enable Focused Inbox feature

Enable Focused Inbox feature for organization

When using the PowerShell cmdlet Set-OrganizationConfig, the focused inbox feature will be activated for all existing Exchange mailboxes and all new Exchange mailboxes that will be created.

If we want to enable the focused inbox feature for a specific Exchange mailbox, we can use the PowerShell cmdlet Set-FocusedInbox.

PowerShell command example:

Set-OrganizationConfig -FocusedInboxOn $True

Enable Focused Inbox for single mailbox

PowerShell command syntax:

Set-FocusedInbox -Identity "Mailbox" -FocusedInboxOn $True

Run the below PowerShell command example:

Set-FocusedInbox -Identity "Stephen.Hunter@m365info.com" -FocusedInboxOn $True

The PowerShell outcome:

MailboxIdentity              : ea2b7e6a-fb01-42e3-9fb8-ccf13a5f2e67
FocusedInboxOn               : True
FocusedInboxOnLastUpdateTime : 03/05/2023 19.58.16
Identity                     : 
IsValid                      : True
ObjectState                  : New

Bulk enable Focused Inbox for user mailboxes

You can enable the focused inbox feature for all user mailboxes in one PowerShell command.

Run the below PowerShell command:

Get-MailBox -ResultSize Unlimited -RecipientTypeDetails UserMailbox | Set-FocusedInbox -FocusedInboxOn $True

Note: Remember to turn on Focused Inbox in Outlook after these changes are made.

When a user mailbox opens Outlook after these changes are made, you will get a pop-up.

  • Click on Turn on Focused Inbox
Manage turn on focused inbox in microsoft 365 Outlook using PowerShell

2. Disable Focused Inbox feature

When using the PowerShell cmdlet Set-OrganizationConfig, the focused inbox feature will be activated for all existing Exchange mailboxes and all new Exchange mailboxes that will be created.

Disable Focused Inbox for organization

PowerShell command example:

Set-OrganizationConfig -FocusedInboxOn $False

Disable Focused Inbox for single mailbox

If you want to disable the focused inbox feature for a specific Exchange mailbox, you can use the PowerShell cmdlet Set-FocusedInbox.

PowerShell command syntax:

Set-FocusedInbox -Identity "Mailbox" -FocusedInboxOn $False

PowerShell command example:

Set-FocusedInbox -Identity "Stephen.Hunter@m365info.com" -FocusedInboxOn $False

The PowerShell outcome will look like this:

MailboxIdentity              : ea2b7e6a-fb01-42e3-9fb8-ccf13a5f2e67
FocusedInboxOn               : False
FocusedInboxOnLastUpdateTime : 03/05/2023 21.47.34
Identity                     : 
IsValid                      : True
ObjectState                  : New

Bulk disable Focused Inbox for user mailboxes

You can also disable the focused inbox feature for all Exchange user mailboxes using the PowerShell command below.

Get-MailBox -ResultSize Unlimited -RecipientTypeDetails UserMailbox | Set-FocusedInbox -FocusedInboxOn $False

3. Display and export Focused Inbox settings

We will show you how to use the cmdlet Get-OrganizationConfig to manage your organization.

Display Focused Inbox settings of the organization

PowerShell command example:

Get-OrganizationConfig | Select *FocusedInbox*

PowerShell result:

FocusedInboxOn FocusedInboxOnLastUpdateTime
-------------- ----------------------------
          True 03/05/2023 21.44.27   

Display Focused Inbox settings of single mailbox

We will show you how to use the Get-FocusedInbox cmdlet to show the Focused Inbox configuration for mailboxes in your organization.

PowerShell command syntax:

$Mailbox = Get-Mailbox -Identity "Mailbox"
Get-FocusedInbox -Identity $Mailbox.PrimarySmtpAddress | Select @{n='UserPrincipalName';e={$Mailbox.UserPrincipalName}}, @{n='Name';e={$Mailbox.DisplayName}}, MailboxIdentity, FocusedInboxOn, FocusedInboxOnLastUpdateTime

PowerShell command example:

$Mailbox = Get-Mailbox -Identity "Stephen.Hunter@m365info.com"
Get-FocusedInbox -Identity $Mailbox.PrimarySmtpAddress | Select @{n='UserPrincipalName';e={$Mailbox.UserPrincipalName}}, @{n='Name';e={$Mailbox.DisplayName}}, MailboxIdentity, FocusedInboxOn, FocusedInboxOnLastUpdateTime

The result of a single mailbox shows information about the focused inbox.

UserPrincipalName            : Stephen.Hunter@m365info.com
Name                         : Stephen Hunter
MailboxIdentity              : ea2b7e6a-fb01-42e3-9fb8-ccf13a5f2e67
FocusedInboxOn               : False
FocusedInboxOnLastUpdateTime : 03/05/2023 21:47:34

Display Focused Inbox information of all user mailboxes

You can view information about all Exchange user mailboxes that have enabled or disabled the Focused Inbox feature.

PowerShell command example:

$UserMailboxes = Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox

$Results = foreach ($Mailbox in $UserMailboxes) {
    Get-FocusedInbox -Identity $Mailbox.PrimarySmtpAddress | 
    Select @{n='UserPrincipalName';e={$Mailbox.UserPrincipalName}}, 
           @{n='Name';e={$Mailbox.DisplayName}}, 
           @{n='MailboxIdentity';e={$_.MailboxIdentity}},
           @{n='FocusedInboxOn';e={$_.FocusedInboxOn}},
           @{n='FocusedInboxOnLastUpdateTime';e={$_.FocusedInboxOnLastUpdateTime}}
}

$Results | Format-Table UserPrincipalName, Name, MailboxIdentity, FocusedInboxOn, FocusedInboxOnLastUpdateTime -AutoSize

It shows a list of all the user mailboxes that have focused inbox enabled (True) or disabled (False).

UserPrincipalName           Name           MailboxIdentity                      FocusedInboxOn FocusedInboxOnLastUpdateTime
-----------------           ----           ---------------                      -------------- ----------------------------
Stephen.Hunter@m365info.com Stephen Hunter ea2b7e6a-fb01-42e3-9fb8-ccf13a5f2e67          False 03/05/2023 21.47.34         
Brenda.Smith@m365info.com   Brenda Smith   d912b0fc-6f7e-4ec2-a9e4-854ed27a511a           True 03/05/2023 21.47.00         
David.Kent@m365info.com     David Kent     eec2668a-0773-4947-93ba-2223f6acfe55           True 03/05/2023 21.47.02         
Susan.Brown@m365info.com    Susan Brown    fd199cb4-2ebf-4171-96e2-12fd75453e39           True 03/05/2023 21.47.03         
Chris.Lucas@m365info.com    Chris Lucas    fa956d8c-87df-4cd4-ac2a-ac1f3d7cac8b           True 03/05/2023 21.47.05         
George.Wilson@m365info.com  George Wilson  d89be5ce-6495-4009-b61b-81126c239c34           True 03/05/2023 21.47.06         
Jill.Bates@m365info.com     Jill Bates     a9532b30-4edb-4b66-a3b0-6ac972a6065b           True 03/05/2023 21.47.08         
Diana.Baker@m365info.com    Diana Baker    b602b148-2fcf-435a-9d34-ce72c3a8c748           True 03/05/2023 21.47.10         
Mary.James@m365info.com     Mary James     3bb176aa-d0ba-47f7-aecc-f4837593006e           True 03/05/2023 21.47.12         
Amanda.Hansen@m365info.com  Amanda Hansen  41377e9c-dc47-46c0-b4a5-1d5bbdcb5cc5           True 03/05/2023 21.47.13         
KellyTest@m365info.com      Kelly Test     KellyTest                                      True 03/05/2023 21.47.16 

Display Focused Inbox information of all user mailboxes enabled

PowerShell command example:

$UserMailboxes = Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox 

$Results = foreach ($Mailbox in $UserMailboxes) {
    Get-FocusedInbox -Identity $Mailbox.PrimarySmtpAddress | Where {$_.FocusedInboxOn -eq $True} | 
    Select @{n='UserPrincipalName';e={$Mailbox.UserPrincipalName}}, 
           @{n='Name';e={$Mailbox.DisplayName}}, 
           @{n='MailboxIdentity';e={$_.MailboxIdentity}},
           @{n='FocusedInboxOn';e={$_.FocusedInboxOn}},
           @{n='FocusedInboxOnLastUpdateTime';e={$_.FocusedInboxOnLastUpdateTime}}
}

$Results | Format-Table UserPrincipalName, Name, MailboxIdentity, FocusedInboxOn, FocusedInboxOnLastUpdateTime -AutoSize

The result only shows a list of user mailboxes with the focused inbox feature enabled.

UserPrincipalName          Name          MailboxIdentity                      FocusedInboxOn FocusedInboxOnLastUpdateTime
-----------------          ----          ---------------                      -------------- ----------------------------
Brenda.Smith@m365info.com  Brenda Smith  d912b0fc-6f7e-4ec2-a9e4-854ed27a511a           True 03/05/2023 21.47.00         
David.Kent@m365info.com    David Kent    eec2668a-0773-4947-93ba-2223f6acfe55           True 03/05/2023 21.47.02         
Susan.Brown@m365info.com   Susan Brown   fd199cb4-2ebf-4171-96e2-12fd75453e39           True 03/05/2023 21.47.03         
Chris.Lucas@m365info.com   Chris Lucas   fa956d8c-87df-4cd4-ac2a-ac1f3d7cac8b           True 03/05/2023 21.47.05         
George.Wilson@m365info.com George Wilson d89be5ce-6495-4009-b61b-81126c239c34           True 03/05/2023 21.47.06         
Jill.Bates@m365info.com    Jill Bates    a9532b30-4edb-4b66-a3b0-6ac972a6065b           True 03/05/2023 21.47.08         
Diana.Baker@m365info.com   Diana Baker   b602b148-2fcf-435a-9d34-ce72c3a8c748           True 03/05/2023 21.47.10         
Mary.James@m365info.com    Mary James    3bb176aa-d0ba-47f7-aecc-f4837593006e           True 03/05/2023 21.47.12         
Amanda.Hansen@m365info.com Amanda Hansen 41377e9c-dc47-46c0-b4a5-1d5bbdcb5cc5           True 03/05/2023 21.47.13         
KellyTest@m365info.com     Kelly Test    KellyTest                                      True 03/05/2023 21.47.16 

Display Focused Inbox information of all user mailboxes disabled

PowerShell command example:

$UserMailboxes = Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox 

$Results = foreach ($Mailbox in $UserMailboxes) {
    Get-FocusedInbox -Identity $Mailbox.PrimarySmtpAddress | Where {$_.FocusedInboxOn -eq $False} | 
    Select @{n='UserPrincipalName';e={$Mailbox.UserPrincipalName}}, 
           @{n='Name';e={$Mailbox.DisplayName}}, 
           @{n='MailboxIdentity';e={$_.MailboxIdentity}},
           @{n='FocusedInboxOn';e={$_.FocusedInboxOn}},
           @{n='FocusedInboxOnLastUpdateTime';e={$_.FocusedInboxOnLastUpdateTime}}
}

$Results | Format-Table UserPrincipalName, Name, MailboxIdentity, FocusedInboxOn, FocusedInboxOnLastUpdateTime -AutoSize

The PowerShell result shows a list of all user mailboxes that have disabled the focused inbox feature.


UserPrincipalName           Name           MailboxIdentity                      FocusedInboxOn FocusedInboxOnLastUpdateTime
-----------------           ----           ---------------                      -------------- ----------------------------
Stephen.Hunter@m365info.com Stephen Hunter ea2b7e6a-fb01-42e3-9fb8-ccf13a5f2e67          False 03/05/2023 21.47.34 

Export Focused Inbox information of all user mailboxes to CSV

PowerShell command example:

$UserMailboxes = Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox

$Results = foreach ($Mailbox in $UserMailboxes) {
    Get-FocusedInbox -Identity $Mailbox.PrimarySmtpAddress | 
    Select @{n='UserPrincipalName';e={$Mailbox.UserPrincipalName}}, 
           @{n='Name';e={$Mailbox.DisplayName}}, 
           @{n='MailboxIdentity';e={$_.MailboxIdentity}},
           @{n='FocusedInboxOn';e={$_.FocusedInboxOn}},
           @{n='FocusedInboxOnLastUpdateTime';e={$_.FocusedInboxOnLastUpdateTime}}
}

$Results | Export-Csv -Path "C:\Temp\FocusedInbox.csv" -NoTypeInformation -Encoding UTF8

It will export the CSV to the C:\Temp folder. Open the CSV file with an application like Microsoft Excel to see the results.

It shows the list of all user mailboxes with the focused inbox feature enabled or disabled.

Manage focused inbox in Microsoft 365 using PowerShell.

4. Use Exchange Online rule to send specific emails Focused Inbox

When using the Focused Inbox feature, the Exchange server, which manages the user mailbox, decides according to an internal algorithm to move or not to move a specific email message to the Focused Inbox.

The Focused Inbox decides which emails to send to the Focus or Other tab. In some cases, the Focused Inbox algorithm can decide that a specific email address is not important and moves the email under the Other tab.

To change this decision, you must inform the Exchange server that you would like to move this specific email to the Focused tab.

The Exchange rule is implemented by defining the characters of these specific emails and asking Exchange to add a specific mail field to the email message header.

This special mail field is named X-MS-Exchange-Organization-BypassFocusedInbox.

We will need to add this mail field and set the value of this mail field to true.

For example:

X-MS-Exchange-Organization-BypassFocusedInbox = true

If the Exchange server locates this mail field, it understands it must bypass the Focused Inbox process.

You can create the Exchange rule manually or via PowerShell.

The following section will show two examples of this Exchange rule that will bypass the Focused Inbox process for specific mail items.

Create Exchange rule to bypass Focused Inbox (specific text)

Create Exchange rule to bypass Focused Inbox process for email that includes specific text in mail subject.

PowerShell command syntax:

New-TransportRule -Name "Name of the rule" -SubjectContainsWords "Text String" -SetHeaderName "X-MS-Exchange-Organization-BypassFocusedInbox" -SetHeaderValue "true"

PowerShell command example:

New-TransportRule -Name "Bypass Clutter – Subject important" -SubjectContainsWords "important" -SetHeaderName "X-MS-Exchange-Organization-BypassFocusedInbox" -SetHeaderValue "true"

Create Exchange rule to bypass Focused Inbox (specific sender)

Create Exchange rule to bypass the Focused Inbox process for email sent from a specific sender.

PowerShell command syntax:

New-TransportRule -Name "Name of the rule" -From "E-mail address" -SetHeaderName "X-MS-Exchange-Organization-BypassFocusedInbox" -SetHeaderValue "true"

PowerShell command example:

New-TransportRule -Name "Bypass Clutter – E-mail from Stephen" -From "Stephen.Hunter@m365info.com" -SetHeaderName "X-MS-Exchange-Organization-BypassFocusedInbox" -SetHeaderValue "true"

Did this help you to manage the focused inbox feature in Microsoft 365 with PowerShell?

Read more: Manage user mailbox with PowerShell »

Conclusion

You learned how to manage the focused inbox in Microsoft 365 using PowerShell. Once you enable the focused inbox feature for a user mailbox, you can display the information and export information to a CSV file. You can also bulk disable the focused inbox feature for all user mailboxes with PowerShell.

Did you enjoy this article? You may also like Convert user mailbox to shared mailbox. Don’t forget to follow us and share this article.

o365info Team

o365info Team

This article was written by our team of experienced IT architects, consultants, and engineers.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *