Almost three years ago, I published a short article detailing on how one can pre-configure mailbox settings in Exchange Online. Basically, we can use the Set-MailboxPlan cmdlet to modify one of the existing plans available in a given Office 365 tenant. Unfortunately, the number of properties we could set is very limited, however it is still useful method to configure mailbox quotas, maximum message size or the single-item recovery window.
Now, as spotted by Damian Scoles, a fellow MVP, Microsoft has released a set of similar cmdlets that allow us to control the “CAS” settings. Those include things like enabling or disabling the different email protocols (IMAP and POP only, sadly), ActiveSync or Remote PowerShell. Many other parameters that can be controlled on a per-mailbox basis via Set-CASMailbox are unavailable unfortunately, and as you can see from the cmdlet help, those are marked as “internal Microsoft use” only. Would have been nice if we could set things like the EWS related settings or OWA/MAPI ones.
Still, in most of the companies I’ve worked with disabling POP/IMAP was a standard procedure, so instead of using “configure mailbox settings” scripts we can now just set them once and for all on the CAS mailbox plan level. Here’s an example:
Set-CASMailboxPlan ExchangeOnlineEnterprise-c853fc2f-d3ac-4379-822d-5382bea6b233 -ImapEnabled $false -PopEnabled $false
And if you want to preconfigure those for all the plans that might be in use in your tenant:
Get-CASMailboxPlan | Set-CASMailboxPlan -ImapEnabled $false -RemotePowerShellEnabled $false -PopEnabled $false -ActiveSyncEnabled $false
There you have it, small but useful addition to the service!