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

## SYNOPSIS

Set Exchange mailbox protocol settings.

## SYNTAX

### Identity

```powershell theme={null}
Set-ExMailboxProtocol [-Identity] <string[]> [-GenerateCmdlets] [-OutputFile <string>]
 [-ModernProtocolsOnly] [-ModernProtocolsAndEws] [-MAPIEnabled <bool>] [-OWAEnabled <bool>]
 [-PopEnabled <bool>] [-ImapEnabled <bool>] [-ActiveSyncEnabled <bool>] [-EwsEnabled <bool>]
 [-SmtpClientAuthenticationDisabled <bool>] [-UniversalOutlookEnabled <bool>]
 [-OutlookMobileEnabled <bool>] [-WhatIf] [-Confirm]
```

### ByDomain

```powershell theme={null}
Set-ExMailboxProtocol -ByDomain <string> [-GenerateCmdlets] [-OutputFile <string>]
 [-ModernProtocolsOnly] [-ModernProtocolsAndEws] [-MAPIEnabled <bool>] [-OWAEnabled <bool>]
 [-PopEnabled <bool>] [-ImapEnabled <bool>] [-ActiveSyncEnabled <bool>] [-EwsEnabled <bool>]
 [-SmtpClientAuthenticationDisabled <bool>] [-UniversalOutlookEnabled <bool>]
 [-OutlookMobileEnabled <bool>] [-WhatIf] [-Confirm]
```

### FromCSV

```powershell theme={null}
Set-ExMailboxProtocol -FromCSV <string> [-GenerateCmdlets] [-OutputFile <string>]
 [-ModernProtocolsOnly] [-ModernProtocolsAndEws] [-MAPIEnabled <bool>] [-OWAEnabled <bool>]
 [-PopEnabled <bool>] [-ImapEnabled <bool>] [-ActiveSyncEnabled <bool>] [-EwsEnabled <bool>]
 [-SmtpClientAuthenticationDisabled <bool>] [-UniversalOutlookEnabled <bool>]
 [-OutlookMobileEnabled <bool>] [-WhatIf] [-Confirm]
```

### AllMailboxes

```powershell theme={null}
Set-ExMailboxProtocol -AllMailboxes [-GenerateCmdlets] [-OutputFile <string>] [-ModernProtocolsOnly]
 [-ModernProtocolsAndEws] [-MAPIEnabled <bool>] [-OWAEnabled <bool>] [-PopEnabled <bool>]
 [-ImapEnabled <bool>] [-ActiveSyncEnabled <bool>] [-EwsEnabled <bool>]
 [-SmtpClientAuthenticationDisabled <bool>] [-UniversalOutlookEnabled <bool>]
 [-OutlookMobileEnabled <bool>] [-WhatIf] [-Confirm]
```

## DESCRIPTION

This function sets the protocol settings (MAPI, OWA, IMAP, POP, EWS, ActiveSync)
for Exchange Online mailboxes.
It can target mailboxes by identity, by domain, from a CSV file, or all mailboxes in the organization.
It also allows enabling modern protocols only or modern protocols along with EWS.
Additionally, it can configure SMTP Client Authentication settings at the mailbox level.

## EXAMPLES

### EXAMPLE 1

```powershell theme={null}
Set-ExMailboxProtocol -Identity "user@example.com" -ModernProtocolsOnly
```

Sets modern protocols only for the specified mailbox.

### EXAMPLE 2

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

Generates the Set-EXOCasMailbox cmdlets for all mailboxes in the specified domain to enable modern protocols only and saves them to the specified file without executing them.

### EXAMPLE 3

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

Sets protocol settings for mailboxes listed in the specified CSV file.

### EXAMPLE 4

```powershell theme={null}
Set-ExMailboxProtocol -AllMailboxes -ModernProtocolsAndEws
```

Sets modern protocols along with EWS for all mailboxes in the organization.

## PARAMETERS

### -ActiveSyncEnabled

Set ActiveSync protocol enabled or disabled.

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

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

### -EwsEnabled

Set EWS protocol enabled or disabled.

```yaml theme={null}
Type: System.Boolean
DefaultValue: False
SupportsWildcards: false
Aliases: []
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 protocol settings 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: ''
```

### -ImapEnabled

Set IMAP protocol enabled or disabled.

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

### -MAPIEnabled

Set MAPI protocol enabled or disabled.

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

### -ModernProtocolsAndEws

If specified, enables modern protocols (MAPI, OWA, Outlook Mobile) along with EWS, and disables legacy protocols (POP, IMAP, ActiveSync) along with disabling SMTP Client
Authentication at the mailbox level.

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

### -ModernProtocolsOnly

If specified, enables only modern protocols (MAPI, OWA, Outlook Mobile) and disables legacy protocols (POP, IMAP, ActiveSync, EWS) along with disabling SMTP Client Authentication
at the mailbox level.

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

### -OutlookMobileEnabled

Set Outlook Mobile access enabled or disabled.

```yaml theme={null}
Type: System.Boolean
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  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')-SetExMailboxProtocol_Commands.txt\""
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -OWAEnabled

Set OWA protocol enabled or disabled.

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

### -PopEnabled

Set POP protocol enabled or disabled.

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

### -SmtpClientAuthenticationDisabled

Set SMTP Client Authentication disabled or enabled at the mailbox level.

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

### -UniversalOutlookEnabled

Set Universal Outlook (the built-in Mail and Calendar app in Windows) enabled or disabled.

```yaml theme={null}
Type: System.Boolean
DefaultValue: False
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-ExMailboxProtocol](https://ps365.clidsys.com/docs/commands/Set-ExMailboxProtocol)
