Commands › Exchange Online

Get-EXORecipient

Exchange Online ExchangeOnlineManagement Get-*

For more information, see About the Exchange Online PowerShell module. Use the Get-EXORecipient cmdlet to view existing recipient objects in your organization. This cmdlet returns all mail-enabled objects (for example, mailboxes, mail users, mail contacts, and distribution groups).

Quick start script

# Get-EXORecipient — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-EXORecipient | Format-List

# 3. Export for evidence / drift tracking
Get-EXORecipient | Export-Clixml .\EXORecipient-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

Identity (Default)

Get-EXORecipient [[-Identity] <String>]
 [-ExternalDirectoryObjectId <Guid>]
 [-Filter <String>]
 [-IncludeSoftDeletedRecipients]
 [-OrganizationalUnit <String>]
 [-PrimarySmtpAddress <String>]
 [-Properties <String[]>]
 [-PropertySets <PropertySet[]>]
 [-RecipientPreviewFilter <String>]
 [-RecipientType <String[]>]
 [-RecipientTypeDetails <String[]>]
 [-ResultSize <Unlimited>]
 [-UserPrincipalName <String>]
 [<CommonParameters>]

Anr

Get-EXORecipient [-Anr <String>]
 [-Filter <String>]
 [-IncludeSoftDeletedRecipients]
 [-OrganizationalUnit <String>]
 [-Properties <String[]>]
 [-PropertySets <PropertySet[]>]
 [-RecipientPreviewFilter <String>]
 [-RecipientType <String[]>]
 [-RecipientTypeDetails <String[]>]
 [-ResultSize <Unlimited>]
 [<CommonParameters>]

Parameters (14)

ParameterTypeRequiredWhat it controls
-Identity String The Identity parameter specifies the recipient object that you want to view. For the best performance, we recommend using the following values to identify the recipient:
-Anr String 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...
-ExternalDirectoryObjectId Guid The ExternalDirectoryObjectId parameter identifies the recipient that you want to view by the ObjectId in Microsoft Entra ID.
-Filter String 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'"`.
-IncludeSoftDeletedRecipients SwitchParameter The IncludeSoftDeletedRecipients switch specifies whether to include soft deleted recipients in the results. You don't need to specify a value with this switch.
-OrganizationalUnit String 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...
-PrimarySmtpAddress String The PrimarySmtpAddress identifies the recipient that you want to view by primary SMTP email address (for example, navin@contoso.com).
-Properties String[] The Properties parameter specifies the properties that are returned in the output of this cmdlet. You can specify multiple values separated by commas.
-PropertySets PropertySet[] The PropertySets parameter specifies a logical grouping of properties that are returned in the output of this cmdlet. Valid values are:
-RecipientPreviewFilter String This parameter is reserved for internal Microsoft use.
-RecipientType String[] The RecipientType parameter filters the results by the specified recipient type. Valid values are:
-RecipientTypeDetails String[] The RecipientTypeDetails parameter filters the results by the specified recipient subtype. Valid values are:
-ResultSize Unlimited 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.
-UserPrincipalName String The UserPrincipalName parameter identifies the recipient that you want to view by UPN (for example, navin@contoso.onmicrosoft.com).

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.