Skip to content

Instantly share code, notes, and snippets.

@normansolutions
Last active October 10, 2017 04:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normansolutions/72c13bf66ac4c5699eb8 to your computer and use it in GitHub Desktop.
Save normansolutions/72c13bf66ac4c5699eb8 to your computer and use it in GitHub Desktop.
####Create an Office 365 session connection
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
###Use this Powershell script to disable Clutter across all accounts
Get-Mailbox | Set-Clutter -Enable $true
###Use this PowerShell script to disable Clutter for an individual (in this example "PTest")
Set-Clutter -Identity PTest@YourDomain.com -Enable $false
###Use this PowerShell script to enumerate through an AD Group (in this example "Students")
$AllStudents = Get-DistributionGroupMember -Identity "students"
foreach ($Student in $AllStudents){
Set-Clutter -Identity $Student.Identity -Enable $false
}
###Close Office 365 session connection
Remove-PSSession $Session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment