Forum Discussion

Rising Flight's avatar
Rising Flight
Brass Contributor
Oct 23, 2018

export mailboxes with clutter enabled

Hi experts i want to disable clutter for all my mailboxes in office365, expert how do i export the users list having clutter mailbox enabled.

1 Reply

  • Adam Ochs's avatar
    Adam Ochs
    Iron Contributor

    Hello Rising Flight,

     

    You can do this through Powershell.

     

    Log into the Exchange Online Powershell.

     

    To pull your list:

     

    Get-MailBox -Filter '(RecipientTypeDetails -eq "UserMailbox")' | Where-Object {(Get-Clutter -Identity $_.UserPrincipalName).IsEnabled -eq $True} | select PrimarySmtpAddress | export-csv C:\filepath\filename.csv

    That will give you a CSV will a list of all the email address that have clutter enabled.

     

    To disable it for all users:

     

    1. To do this to all users mailboxes on your tenant:

    Get-MailBox -Filter '(RecipientTypeDetails -eq "UserMailbox")' | Set-Clutter -Enable $False

    2. To do this for just the current enabled ones:

    $AllMailboxes = Get-MailBox -Filter '(RecipientTypeDetails -eq "UserMailbox")' | Where-Object {(Get-Clutter -Identity $_.UserPrincipalName).IsEnabled -eq $True}

     

    ForEach ($Mailbox in $AllMailboxes)
    {
    Set-Clutter -Identity $Mailbox.UserPrincipalName -Enable $False
    }

    Hope this helps!
    Adam

Resources