Hi,
we are looking for an easy way to disable POP and IMAP by default for new mailboxes in Exchange Online.
According to https://gcits.com/knowledge-base/disable-pop-imap-mailboxes-office-365/ this seems to be a good way:
Get-CASMailboxPlan -Filter {ImapEnabled -eq "true" -or PopEnabled -eq "true" } | set-CASMailboxPlan -ImapEnabled $false -PopEnabled $false
On set-casmailboxplan it says:
Note: We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see Connect to Exchange Online PowerShell.
So I thought this may be considered deprecated or not best practice. Is Get-CASMailboxPlan a good way to do this?