---
title: "Get-RemoteMailbox: Check Hybrid Mailboxes in PowerShell"
meta_title: "Get-RemoteMailbox: Check Hybrid Mailboxes in PowerShell"
slug: get-remotemailbox-powershell
published: 2026-11-26T00:00:00.000Z
updated: 2026-11-26T00:00:00.000Z
feature_image: /blog/images/get-remotemailbox-powershell/get-remotemailbox-powershell-syntax-microsoft-learn.1600.webp
feature_image_alt: Microsoft Learn documentation for the Get-RemoteMailbox cmdlet showing its PowerShell syntax
author: James Futhey
author_slug: james
meta_description: "List on-premises users with Exchange Online mailboxes using Get-RemoteMailbox: parameters, examples, OU and filter queries, and how it compares to Get-Mailbox."
status: published
---

**Quick answer:** In an Exchange hybrid setup, Get-RemoteMailbox lists the on-premises users whose mailboxes live in Exchange Online. Run it in the on-premises Exchange Management Shell, with no parameters for all of them or with `-Identity` for one:

```powershell
Get-RemoteMailbox -Identity laura@contoso.com | Format-List
```

Source: [Get-RemoteMailbox on Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/get-remotemailbox).

## Where does it run?

It runs only in on-premises Exchange: Exchange Server 2010, 2013, 2016, 2019 and Subscription Edition. It isn't in Exchange Online PowerShell. Run it in the [Exchange Management Shell](https://learn.microsoft.com/en-us/powershell/exchange/open-the-exchange-management-shell) on an Exchange server.

It reads the on-premises mail user in Active Directory, not the cloud mailbox. Most mail attributes match on both sides, but Microsoft notes that the cloud mailbox has more attributes this cmdlet can't show. For those, use the Exchange admin center in Exchange Online, or connect to Exchange Online and run [Get-Mailbox](/blog/get-mailbox-powershell/).

You need permissions assigned before you can run it. To find the role, see Microsoft's article [Find the permissions required to run any Exchange cmdlet](https://learn.microsoft.com/en-us/powershell/exchange/find-exchange-cmdlet-permissions).

## Which parameters does it take?

| Parameter | What it does |
| --- | --- |
| `-Identity` | The user to show, by name, alias, DN, canonical DN, `Domain\Username`, email address, GUID, LegacyExchangeDN, SamAccountName or UPN. Leave it out to get every remote mailbox. |
| `-Anr` | Ambiguous name search on CN, display name, first name, last name and alias. You can't use it with `-Identity`. |
| `-Archive` | Required to return the user's archive mailbox in the results. |
| `-Filter` | An OPATH filter, such as `"DisplayName -like 'Sales*'"`. |
| `-OnPremisesOrganizationalUnit` | Only users in one OU or domain, as returned by Get-OrganizationalUnit. |
| `-ResultSize` | Maximum results. The default is 1000. Use `Unlimited` for all. |
| `-SortBy` | Sorts ascending by `Name`, `DisplayName` or `Alias`. One property at a time. |
| `-Credential` | Credentials for reading Active Directory, from `Get-Credential`. |
| `-DomainController` | The domain controller to read from, such as `dc01.contoso.com`. |
| `-ReadFromDomainController` | Reads from a domain controller in the user's domain instead of a global catalog. |
| `-IgnoreDefaultScope` | Searches the whole forest instead of the session's default recipient scope. |

## Examples

Every remote mailbox:

```powershell
Get-RemoteMailbox
```

One user, every property:

```powershell
Get-RemoteMailbox -Identity laura@contoso.com | Format-List
```

With other credentials for Active Directory:

```powershell
$Credentials = Get-Credential
Get-RemoteMailbox -Credential $Credentials
```

Those three are Microsoft's examples from Learn. We added the next three.

The routing address and type for one user:

```powershell
Get-RemoteMailbox -Identity laura@contoso.com | Format-List Name,RemoteRoutingAddress,RecipientTypeDetails
```

Users in one OU:

```powershell
Get-RemoteMailbox -OnPremisesOrganizationalUnit "contoso.com/Sales" -ResultSize Unlimited
```

Users whose display name starts with Sales, sorted:

```powershell
Get-RemoteMailbox -Filter "DisplayName -like 'Sales*'" -SortBy DisplayName
```

## How do I export every remote mailbox to CSV?

```powershell
Get-RemoteMailbox -ResultSize Unlimited |
    Select-Object DisplayName,PrimarySmtpAddress,RemoteRoutingAddress,RecipientTypeDetails |
    Export-Csv "C:\temp\remote-mailboxes.csv" -NoTypeInformation
```

Without `-ResultSize Unlimited` the list stops at 1000. Microsoft notes that limits on your domain controllers can still cap an unlimited query.

## What is RemoteRoutingAddress?

It's the SMTP address of the user's mailbox in Exchange Online. You set it when you create the remote mailbox with [Enable-RemoteMailbox](/blog/enable-remotemailbox-powershell/) or [New-RemoteMailbox](/blog/new-remotemailbox-powershell/), and change it later with [Set-RemoteMailbox](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/set-remotemailbox). Get-RemoteMailbox is the quickest way to check it.

## Get-RemoteMailbox or Get-Mailbox?

| | Get-RemoteMailbox | Get-Mailbox in Exchange Online |
| --- | --- | --- |
| Runs in | On-premises Exchange | Exchange Online |
| Reads | The on-premises mail user in Active Directory | The cloud mailbox |
| Shows every cloud mailbox attribute | No | Yes |
| Connect with | Exchange Management Shell | `Connect-ExchangeOnline` |

In a hybrid setup, run Get-RemoteMailbox to check the on-premises side, and Get-Mailbox after you connect with the [Exchange Online PowerShell module](/blog/install-exchange-online-powershell-module/) to check the cloud side.

## Troubleshooting

| Problem | Fix |
| --- | --- |
| Cmdlet not found | It's on-premises only. Open the Exchange Management Shell on an Exchange server, not Exchange Online PowerShell. |
| Every user came back when you asked for one | The `-Identity` value was `$null` or didn't match. Microsoft warns that this returns all objects. Check the value, especially in a loop. |
| Results stop at 1000 | Add `-ResultSize Unlimited`. |
| A cloud mailbox setting is missing | Get-RemoteMailbox shows only the on-premises side. Check it with Get-Mailbox in Exchange Online. |
| Error with `-IgnoreDefaultScope` | With that switch, `-Identity` must be a DN and you can't use `-DomainController`. |
| Data looks out of date after `Set-AdServerSettings -ViewEntireForest $true` | Add `-ReadFromDomainController`. Otherwise the command might read a global catalog with outdated information. |

## Summary

- Get-RemoteMailbox lists on-premises users whose mailboxes are in Exchange Online.
- It runs only in on-premises Exchange and reads the Active Directory mail user, not the cloud mailbox.
- Use `-Identity` for one user, `-Filter` or `-OnPremisesOrganizationalUnit` for a set, and `-ResultSize Unlimited` for more than 1000.
- Use Get-Mailbox in Exchange Online for the cloud mailbox's own settings.

Related: [Enable-RemoteMailbox](/blog/enable-remotemailbox-powershell/), [New-RemoteMailbox](/blog/new-remotemailbox-powershell/), [Get-Mailbox](/blog/get-mailbox-powershell/).

Meeting Room 365 turns any iPad or Android tablet into a room display for Exchange and Microsoft 365 calendars. See the [features](/features/) or [pricing](/pricing/): $9 a display a month.
