Thursday, 2 July 2015

Enable or Disable Clutter for Office 365 User Mailboxes

First, connect to Office 365 using PowerShell

Run below command to check the status of the Clutter

Get-Clutter -Identity username@domain.com

IsEnabled   : False
Identity    :
IsValid     : True
ObjectState : New

Above output shows that clutter is disabled on this mailbox.


To enable clutter on one user

Set-Clutter -Identity username@domain.com -Enable $True

To disable clutter on one user

Set-Clutter -Identity username@domain.com -Enable $False

To enable clutter on all users

Get-Mailbox | Set-Clutter -Enable $True

To disable clutter on all users

Get-Mailbox | Set-Clutter -Enable $False

Generate a report on all Office 365 users with Clutter enabled or disabled

Connect to the mail Office 365 using PowerShell as mentioned above
In addition to that add below command

Set-ExecutionPolicy Unrestricted

Above command will let you run the powershell scripts without any restrictions.
Now download the powershell script and place it on your desktop.
Now run go to that location and run the script

PS C:\Users\user\Desktop> .\Get-ClutterDetails.ps1

Security warning
Run only scripts that you trust. While scripts from the internet can be useful,
 this script can potentially harm your computer. If you trust this script, use
the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\Users\knkumar\Desktop\Get-ClutterDetails.ps1?


It will prompt to run the script, type R and hit enter

[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): R

Now it will prompt for credentials, provide global administrator credentials.

It will process on all the mailboxes and generate a report on your desktop

Completed - data saved to ClutterDetails.csv