Last active
October 10, 2017 04:43
-
-
Save normansolutions/72c13bf66ac4c5699eb8 to your computer and use it in GitHub Desktop.
For use on blog post http://normansolutions.co.uk/post/disable-clutter-in-office-365
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####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