> ## 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.

# Set-ExMailboxMaxSize

## SYNOPSIS

Set maximum mailbox size for specified mailboxes.

## SYNTAX

### Identity

```powershell theme={null}
Set-ExMailboxMaxSize [-Identity] <string[]> [-GenerateCmdlets] [-OutputFile <string>] [-WhatIf]
 [-Confirm]
```

### ByDomain

```powershell theme={null}
Set-ExMailboxMaxSize -ByDomain <string> [-GenerateCmdlets] [-OutputFile <string>] [-WhatIf]
 [-Confirm]
```

### FromCSV

```powershell theme={null}
Set-ExMailboxMaxSize -FromCSV <string> [-GenerateCmdlets] [-OutputFile <string>] [-WhatIf]
 [-Confirm]
```

### AllMailboxes

```powershell theme={null}
Set-ExMailboxMaxSize -AllMailboxes [-GenerateCmdlets] [-OutputFile <string>] [-WhatIf] [-Confirm]
```

## DESCRIPTION

This function sets the maximum mailbox size (MaxReceiveSize and MaxSendSize) for Exchange Online mailboxes.
It can target mailboxes by identity, by domain, from a CSV file, or all mailboxes in the organization.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Set-ExMailboxMaxSize -Identity "user@example.com" -MaxReceiveSize 150MB -MaxSendSize 150MB
```

Sets the maximum mailbox size for the specified mailbox.

### EXAMPLE 2

```powershell theme={null}
Set-ExMailboxMaxSize -ByDomain "example.com"
```

Sets the maximum mailbox size for all mailboxes in the specified domain.

### EXAMPLE 3

```powershell theme={null}
Set-ExMailboxMaxSize -AllMailboxes
```

Sets the maximum mailbox size for all mailboxes in the organization.

### EXAMPLE 4

```powershell theme={null}
Set-ExMailboxMaxSize -FromCSV "C:\path\to\file.csv"
```

Sets the maximum mailbox size for mailboxes listed in the specified CSV file.

### EXAMPLE 5

```powershell theme={null}
Set-ExMailboxMaxSize -ByDomain "example.com" -GenerateCmdlets -OutputFile "C:\path\to\commands.ps1"
```

Generates the Set-Mailbox cmdlets for all mailboxes in the specified domain and saves them to the specified file without executing them.

## PARAMETERS

### -AllMailboxes

If specified, all mailboxes in the organization will be processed.

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

### -ByDomain

Filter mailboxes by domain name.
All mailboxes with a primary SMTP address in this domain will be processed.

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

### -Confirm

Prompts you for confirmation before running the cmdlet.

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

### -FromCSV

The path to a CSV file containing mailbox identities to process.

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

### -GenerateCmdlets

If specified, the function will generate the cmdlets and save them to a file instead of executing them.

```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: ''
```

### -Identity

The identity of the mailbox(es) to set the maximum size for.
This can be an array of email addresses, usernames, or display names.

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

### -OutputFile

The path to the output file where generated cmdlets will be saved.
Default is a timestamped file in the current directory.

```yaml theme={null}
Type: System.String
DefaultValue: "\"$(Get-Date -Format 'yyyy-MM-dd_HHmmss')-SetExMailboxMaxSize-Commands.ps1\""
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

```yaml theme={null}
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
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/Set-ExMailboxMaxSize](https://ps365.clidsys.com/docs/commands/Set-ExMailboxMaxSize)
