Set-ExMailboxProtocol
SYNOPSIS
Set Exchange mailbox protocol settings.
SYNTAX
Identity
Set-ExMailboxProtocol -Identity <String[]> [-GenerateCmdlets] [-OutputFile <String>] [-ModernProtocolsOnly]
[-ModernProtocolsAndEws] [-MAPIEnabled <Boolean>] [-OWAEnabled <Boolean>] [-PopEnabled <Boolean>]
[-ImapEnabled <Boolean>] [-ActiveSyncEnabled <Boolean>] [-EwsEnabled <Boolean>]
[-SmtpClientAuthenticationDisabled <Boolean>] [-UniversalOutlookEnabled <Boolean>]
[-OutlookMobileEnabled <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
ByDomain
Set-ExMailboxProtocol -ByDomain <String> [-GenerateCmdlets] [-OutputFile <String>] [-ModernProtocolsOnly]
[-ModernProtocolsAndEws] [-MAPIEnabled <Boolean>] [-OWAEnabled <Boolean>] [-PopEnabled <Boolean>]
[-ImapEnabled <Boolean>] [-ActiveSyncEnabled <Boolean>] [-EwsEnabled <Boolean>]
[-SmtpClientAuthenticationDisabled <Boolean>] [-UniversalOutlookEnabled <Boolean>]
[-OutlookMobileEnabled <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
FromCSV
Set-ExMailboxProtocol -FromCSV <String> [-GenerateCmdlets] [-OutputFile <String>] [-ModernProtocolsOnly]
[-ModernProtocolsAndEws] [-MAPIEnabled <Boolean>] [-OWAEnabled <Boolean>] [-PopEnabled <Boolean>]
[-ImapEnabled <Boolean>] [-ActiveSyncEnabled <Boolean>] [-EwsEnabled <Boolean>]
[-SmtpClientAuthenticationDisabled <Boolean>] [-UniversalOutlookEnabled <Boolean>]
[-OutlookMobileEnabled <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
AllMailboxes
Set-ExMailboxProtocol [-AllMailboxes] [-GenerateCmdlets] [-OutputFile <String>] [-ModernProtocolsOnly]
[-ModernProtocolsAndEws] [-MAPIEnabled <Boolean>] [-OWAEnabled <Boolean>] [-PopEnabled <Boolean>]
[-ImapEnabled <Boolean>] [-ActiveSyncEnabled <Boolean>] [-EwsEnabled <Boolean>]
[-SmtpClientAuthenticationDisabled <Boolean>] [-UniversalOutlookEnabled <Boolean>]
[-OutlookMobileEnabled <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
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
Set-ExMailboxProtocol -Identity "user@example.com" -ModernProtocolsOnly
Sets modern protocols only for the specified mailbox.
EXAMPLE 2
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
Set-ExMailboxProtocol -FromCSV "C:\path\to\file.csv"
Sets protocol settings for mailboxes listed in the specified CSV file.
EXAMPLE 4
Set-ExMailboxProtocol -AllMailboxes -ModernProtocolsAndEws
Sets modern protocols along with EWS for all mailboxes in the organization.
PARAMETERS
-Identity
The identity of the mailbox(es) to set protocol settings for. This can be an array of email addresses, usernames, or display names.
Type: String[]
Parameter Sets: Identity
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ByDomain
Filter mailboxes by domain name. All mailboxes with a primary SMTP address in this domain will be processed.
Type: String
Parameter Sets: ByDomain
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FromCSV
The path to a CSV file containing mailbox identities to process.
Type: String
Parameter Sets: FromCSV
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AllMailboxes
If specified, all mailboxes in the organization will be processed.
Type: SwitchParameter
Parameter Sets: AllMailboxes
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-GenerateCmdlets
If specified, the function will generate the Set-EXOCasMailbox cmdlets and save them to a file instead of executing them.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-OutputFile
The path to the output file where generated cmdlets will be saved. Default is a timestamped file in the current directory.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: "$(Get-Date -Format 'yyyy-MM-dd_HHmmss')-SetExMailboxProtocol_Commands.txt"
Accept pipeline input: False
Accept wildcard characters: False
-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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-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.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-MAPIEnabled
Set MAPI protocol enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-OWAEnabled
Set OWA protocol enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-PopEnabled
Set POP protocol enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ImapEnabled
Set IMAP protocol enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ActiveSyncEnabled
Set ActiveSync protocol enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-EwsEnabled
Set EWS protocol enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SmtpClientAuthenticationDisabled
Set SMTP Client Authentication disabled or enabled at the mailbox level.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-UniversalOutlookEnabled
Set Universal Outlook (the built-in Mail and Calendar app in Windows) enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-OutlookMobileEnabled
Set Outlook Mobile access enabled or disabled.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.