How it works...

The Set-CASMailbox cmdlet allows you to configure which protocols and services a particular mailbox user can access. To determine the existing settings, we can use the Get-CASMailbox cmdlet. For instance, if you need to retrieve all users that have been blocked from connecting to their mailboxes in non-cached mode, use the following command:

    Get-CASMailbox | Where-Object{$_.MAPIBlockOutlookNonCachedMode}  

To find all mailboxes blocked from using Outlook Anywhere, the command is almost identical, just reference the correct property name:

    Get-CASMailbox | Where-Object{$_.MAPIBlockOutlookRpcHttp}  

In both examples, we pipe the Get-CASMailbox to the Where-Object cmdlet. Inside the filter, we're checking to see if the property ...

Get Microsoft Exchange Server 2016 PowerShell Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.