Forum Discussion
Grace Yin
Jan 16, 2019Iron Contributor
How to disable IMAP/POP3 globally but excluding a specific mailbox?
Hi, We want to disable IMAP/POP3 to entire organization, but allow a couple mailboxes to have those features. How can we approach it? Please help! Thanks in advance!
- Jan 18, 2019
I called Microsoft today. There is the script to disable IMAP/POP for all mailboxes expect abc@abc.com.
Get-CASMailbox -ResultSize Unlimited | where {$_.Name -ne "abc"} | Set-CASMailbox -PopEnabled $false -ImapEnabled $false
Note: abc is the display name of mailbox abc@abc.com.
Mario Pastora
Mar 29, 2019Brass Contributor
is this also including Shared Mailboxes that are licensed?
MrOCanada
Jul 15, 2019Copper Contributor
fyi, Configuring the CAS Mailbox Plan will help with future mailbox creations.
https://gcits.com/knowledge-base/disable-pop-imap-mailboxes-office-365/
Disabling IMAP and POP for all future mailboxes
1 | Get-CASMailboxPlan -Filter {ImapEnabled -eq "true" -or PopEnabled -eq "true" } | set-CASMailboxPlan -ImapEnabled $false -PopEnabled $false |
Disabling IMAP and POP for all existing mailboxes
1 | Get-CASMailbox -Filter {ImapEnabled -eq "true" -or PopEnabled -eq "true" } | Select-Object @{n = "Identity"; e = {$_.primarysmtpaddress}} | Set-CASMailbox -ImapEnabled $false -PopEnabled $false |