Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
####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
You can’t perform that action at this time.