Easy little Powershell one-liner here. It finds mailbox plans with imap or pop enabled and then sets the default to off.

Get-CASMailboxPlan -Filter {ImapEnabled -eq "true" -or PopEnabled -eq "true" } | set-CASMailboxPlan -ImapEnabled $false -PopEnabled $false