Commands › Exchange Online

Get-Recipient

Exchange Online ExchangeOnlineManagement Get-*

View existing recipient objects in your organization. This cmdlet returns all mail-enabled objects (for example, mailboxes, mail users, mail contacts, and distribution groups). **Note**: In Exchange Online PowerShell, we recommend that you use the Get-EXORecipient cmdlet instead of this cmdlet. For more information, see Connect to Exchange Online PowerShell. In cloud environments, to return Microsoft 365 Groups, you need to use the RecipientTypeDetails parameter with the value GroupMailbox.

Quick start script

# Get-Recipient — 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-Recipient | Format-List

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

Syntax — 4 parameter sets

AnrSet

Get-Recipient [-Anr <String>]
 [-AuthenticationType <AuthenticationType>]
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-Filter <String>]
 [-IgnoreDefaultScope]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-PropertySet <PropertySet>]
 [-ReadFromDomainController]
 [-RecipientType <RecipientType[]>]
 [-RecipientTypeDetails <RecipientTypeDetails[]>]
 [-ResultSize <Unlimited>]
 [-SortBy <String>]
 [-Capabilities <MultiValuedProperty>]
 [-Database <DatabaseIdParameter>]
 [-Properties <String[]>]
 [-IncludeManagerWithDisplayName]
 [-IncludeSoftDeletedRecipients]
 [<CommonParameters>]

Identity

Get-Recipient [[-Identity] <RecipientIdParameter>]
 [-AuthenticationType <AuthenticationType>]
 [-BookmarkDisplayName <String>]
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-Filter <String>]
 [-IgnoreDefaultScope]
 [-IncludeBookmarkObject <Boolean>]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-PropertySet <PropertySet>]
 [-ReadFromDomainController]
 [-RecipientType <RecipientType[]>]
 [-RecipientTypeDetails <RecipientTypeDetails[]>]
 [-ResultSize <Unlimited>]
 [-SortBy <String>]
 [-Capabilities <MultiValuedProperty>]
 [-Properties <String[]>]
 [-IncludeManagerWithDisplayName]
 [-IncludeSoftDeletedRecipients]
 [<CommonParameters>]

DatabaseSet

Get-Recipient [-Database <DatabaseIdParameter>]
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-Filter <String>]
 [-IgnoreDefaultScope]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-Properties <String[]>]
 [-PropertySet <PropertySet>]
 [-ReadFromDomainController]
 [-RecipientType <RecipientType[]>]
 [-RecipientTypeDetails <RecipientTypeDetails[]>]
 [-ResultSize <Unlimited>]
 [-SortBy <String>]
 [-IncludeSoftDeletedRecipients]
 [<CommonParameters>]
 [<CommonParameters>]

RecipientPreviewFilterSet

Get-Recipient [-RecipientPreviewFilter <String>]
 [-AuthenticationType <AuthenticationType>]
 [-Capabilities <MultiValuedProperty>]
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-Filter <String>]
 [-IgnoreDefaultScope]
 [-IncludeManagerWithDisplayName]
 [-IncludeSoftDeletedRecipients]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-Properties <String[]>]
 [-PropertySet <PropertySet>]
 [-ReadFromDomainController]
 [-RecipientType <RecipientType[]>]
 [-RecipientTypeDetails <RecipientTypeDetails[]>]
 [-ResultSize <Unlimited>]
 [-SortBy <String>]
 [<CommonParameters>]

Parameters (22)

ParameterTypeRequiredWhat it controls
-Identity RecipientIdParameter The Identity parameter specifies the recipient object that you want to view. You can use any value that uniquely identifies the recipient. For example:
-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...
-AuthenticationType AuthenticationType This parameter is available only in the cloud-based service.
-BookmarkDisplayName String This parameter is reserved for internal Microsoft use.
-Capabilities MultiValuedProperty This parameter is available only in the cloud-based service.
-Credential PSCredential This parameter is available only in on-premises Exchange.
-Database DatabaseIdParameter This parameter is available only in on-premises Exchange.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-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'"`.
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-IncludeBookmarkObject Boolean This parameter is reserved for internal Microsoft use.
-IncludeManagerWithDisplayName SwitchParameter This parameter is available only in the cloud-based service.
-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 OrganizationalUnitIdParameter 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...
-Properties String[] This parameter is reserved for internal Microsoft use.
-PropertySet PropertySet This parameter is reserved for internal Microsoft use.
-ReadFromDomainController SwitchParameter This parameter is available only in on-premises Exchange.
-RecipientPreviewFilter String The RecipientPreviewFilter parameter tests a recipient filter that you would use in a dynamic distribution group, address list, or email address policy. This parameter uses the LDAP filter syntax.
-RecipientType RecipientType[] The RecipientType parameter filters the results by the specified recipient type. Valid values are:
-RecipientTypeDetails RecipientTypeDetails[] 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.
-SortBy String The SortBy parameter specifies the property to sort the results by. You can sort by only one property at a time. The results are sorted in ascending order.

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