Get-EXOCasMailbox

This cmdlet is available only in the Exchange Online PowerShell V2 module. For more information, see Use the Exchange Online PowerShell V2 module (https://docs.microsoft.com/powershell/exchange/exchange-online/exchange-online-powershell-v2/exchange-online-powershell-v2/exchange-online-powershell-v2).

Use the Get-EXOCasMailbox cmdlet to view the Client Access settings that are configured on mailboxes.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://docs.microsoft.com/powershell/exchange/exchange-server/exchange-cmdlet-syntax).

Syntax

Get-EXOCasMailbox
   [[-Identity] <String>]
   [-Filter <String>]
   [-ExternalDirectoryObjectId <Guid>]
   [-OrganizationalUnit <String>]
   [-Properties <String[]>]
   [-PropertySets <PropertySet[]>]
   [-ProtocolSettings]
   [-ResultSize <Unlimited>]
   [-UserPrincipalName <String>]
   [<CommonParameters>]
Get-EXOCasMailbox
   [-Anr <String>]
   [-Filter <String>]
   [-OrganizationalUnit <String>]
   [-Properties <String[]>]
   [-PropertySets <PropertySet[]>]
   [-ProtocolSettings]
   [-ResultSize <Unlimited>]
   [<CommonParameters>]

Description

This cmdlet returns a variety of client access settings for one or more mailboxes. These settings include options for Outlook on the web, Exchange ActiveSync, POP3, and IMAP4.

Examples

Example 1

Get-EXOCASMailbox -Identity "JeffHay@contoso.com"

This example returns the values of the following client access settings for the user with Identity Jeffhay@contoso.com:

  • ActiveSyncEnabled

  • EwsEnabled

  • OWAEnabled

  • PopEnabled

  • ImapEnabled

  • MAPIEnabled

  • ECPEnabled

Parameters

-Anr

The Anr parameter specifies a string on which to perform an ambiguous name resolution (ANR) search. You can specify a partial string and search for objects with an attribute that matches that string. The default attributes searched are:

  • CommonName (CN)

  • DisplayName

  • FirstName

  • LastName

  • Alias

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-ExternalDirectoryObjectId

The ExternalDirectoryObjectId parameter identifies the mailbox you want to view by using the ObjectId of the mailbox in Azure Active Directory. You can use this value instead of the Identity parameter.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
Applies to:Exchange Online
-Filter

The Filter parameter uses OPath syntax to filter the results by the specified properties and values. The search criteria uses the syntax "Property -ComparisonOperator 'Value'".

  • Enclose the whole OPath filter in double quotation marks " ". If the filter contains system values (for example, $true, $false, or $null), use single quotation marks ' ' instead. Although this parameter is a string (not a system block), you can also use braces { }, but only if the filter doesn't contain variables.

  • Property is a filterable property. For more information about the filterable properties, see Get-EXOCasMailbox property sets and Filterable properties for the Filter parameter.

  • ComparisonOperator is an OPath comparison operator (for example -eq for equals and -like for string comparison). For more information about comparison operators, see about_Comparison_Operators.

  • Value is the property value to search for. Enclose text values and variables in single quotation marks ('Value' or '$Variable'). If a variable value contains single quotation marks, you need to identify (escape) the single quotation marks to expand the variable correctly. For example, instead of '$User', use '$($User -Replace "'","''")'. Don't enclose integers or system values (for example, 500, $true, $false, or $null).

You can chain multiple search criteria together using the logical operators -and and -or. For example, "Criteria1 -and Criteria2" or "(Criteria1 -and Criteria2) -or Criteria3".

For detailed information about OPath filters in Exchange, see Additional OPATH syntax information.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-Identity

The Identity parameter specifies the mailbox you want to view. You can use any value that uniquely identifies the mailbox. For example:

  • Distinguished name (DN)

  • Canonical DN

  • <domain name>\<account name>

  • Email address

  • GUID

  • LegacyExchangeDN

  • SamAccountName

  • User ID or user principal name (UPN)

Note: This parameter doesn't support Name or Alias values.

You can't use this parameter with the Anr parameter.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
Applies to:Exchange Online
-OrganizationalUnit

The OrganizationalUnit parameter filters the results based on the object's location in Active Directory. Only objects that exist in the specified location are returned. Valid input for this parameter is an organizational unit (OU) or domain that's visible using the Get-OrganizationalUnit cmdlet. You can use any value that uniquely identifies the OU or domain. For example:

  • Name

  • Canonical name

  • Distinguished name (DN)

  • GUID

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-Properties

The Properties parameter specifies the properties that are returned in the output of this cmdlet. You can specify multiple values separated by commas. Wildcards ( * ) are supported.

For more information about the available properties, see Get-EXOCasMailbox property sets.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-PropertySets

The PropertySets parameter specifies a logical grouping of properties that are returned in the output of this cmdlet. Valid values are:

  • Minimum (this is the default value)

  • ActiveSync

  • Ews

  • Imap

  • Mapi

  • Pop

  • ProtocolSettings

  • All

You can specify multiple values separated by commas. Wildcards ( * ) are supported.

For more information about the properties that are included in each property set, see Get-EXOCasMailbox property sets.

Type:PropertySet[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-ProtocolSettings

The ProtocolSettings switch returns the server names, TCP ports and encryption methods for the following settings:

  • ExternalImapSettings

  • InternalImapSettings

  • ExternalPopSettings

  • InternalPopSettings

  • ExternalSmtpSettings

  • InternalSmtpSettings

To see these values, you need to use a formatting cmdlet. For example, Get-CasMailbox laura@contoso.com -ProtocolSettings | Format-List.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-ResultSize

The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.

Type:Unlimited
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online
-UserPrincipalName

The UserPrincipalName parameter specifies the UPN for the mailbox you want to view (for example, navin.contoso.com).

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
Applies to:Exchange Online

Inputs

The following Input parameters are not supported in Get-EXOCasMailbox:

  • IgnoreDefaultScope

  • ReadIsOptimizedForAccessibility

  • SortBy

  • GetImapProtocolLog

  • GetPopProtocolLog

  • SendLogsTo

Outputs

The following properties are removed by design from Get-EXOCasMailbox output:

  • RunspaceId

  • Servername

  • OriginatingServer

  • IsValid