> ## Documentation Index
> Fetch the complete documentation index at: https://ps365.clidsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get-ExMailboxByDomain

## SYNOPSIS

Retrieves all Exchange mailboxes for a specified domain.

## SYNTAX

```powershell theme={null}
Get-ExMailboxByDomain [[-Domain] <string>] [-RecipientTypeDetails <string>] [-ExportToExcel]
```

## DESCRIPTION

This function retrieves all Exchange mailboxes that belong to a specified domain.
It filters the mailboxes based on their *primarySMTP* address to ensure they match the provided domain.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Get-ExMailboxByDomain -Domain "example.com"
```

Returns all Exchange mailboxes associated with the domain "example.com".

## PARAMETERS

### -Domain

The domain for which to retrieve the mailboxes.
This should be a string representing the domain (e.g., "example.com").

```yaml theme={null}
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ExportToExcel

If specified, exports the retrieved mailbox information to an Excel file in the user's profile directory.

```yaml theme={null}
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -RecipientTypeDetails

Filters the mailboxes by their recipient type details.
Acceptable values include:

* UserMailbox
* SharedMailbox
* RoomMailbox
* EquipmentMailbox
* LinkedMailbox
* SchedulingMailbox

```yaml theme={null}
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

## NOTES

## RELATED LINKS

* [https://ps365.clidsys.com/docs/commands/Get-ExMailboxByDomain](https://ps365.clidsys.com/docs/commands/Get-ExMailboxByDomain)
