Commands › Exchange Online

New-SyncMailPublicFolder

Exchange Online ExchangeOnlineManagement New-*

The New-SyncMailPublicFolder cmdlet is used by the Import-MailPublicFoldersForMigration.ps1 and Sync-MailPublicFolders.ps1 scripts to create mail-enabled public folder recipient objects in Exchange Online (the scripts synchronize mail-enabled public folder objects from the source on-premises Exchange organization to Exchange Online). Don't use this cmdlet unless you are directed to do so by Microsoft Customer Service and Support or by specific documentation.

Quick start script

# New-SyncMailPublicFolder — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SyncMailPublicFolder
$before | Format-List

# 3. Make the change (dry run first)
New-SyncMailPublicFolder -Name <String> -Alias <String> -EntryId <String> -WhatIf
New-SyncMailPublicFolder -Name <String> -Alias <String> -EntryId <String>

# 4. Verify and diff
$after = Get-SyncMailPublicFolder
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

New-SyncMailPublicFolder [-Name] <String> [-Alias] <String> -EntryId <String>
 [-AcceptMessagesOnlyFrom <DeliveryRecipientIdParameter[]>]
 [-Confirm]
 [-Contacts <RecipientIdParameter[]>]
 [-CustomAttribute1 <String>]
 [-CustomAttribute10 <String>]
 [-CustomAttribute11 <String>]
 [-CustomAttribute12 <String>]
 [-CustomAttribute13 <String>]
 [-CustomAttribute14 <String>]
 [-CustomAttribute15 <String>]
 [-CustomAttribute2 <String>]
 [-CustomAttribute3 <String>]
 [-CustomAttribute4 <String>]
 [-CustomAttribute5 <String>]
 [-CustomAttribute6 <String>]
 [-CustomAttribute7 <String>]
 [-CustomAttribute8 <String>]
 [-CustomAttribute9 <String>]
 [-DeliverToMailboxAndForward <Boolean>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-EmailAddresses <ProxyAddress[]>]
 [-ExternalEmailAddress <SmtpAddress>]
 [-ForwardingAddress <RecipientIdParameter>]
 [-GrantSendOnBehalfTo <RecipientIdParameter[]>]
 [-HiddenFromAddressListsEnabled]
 [-MaxReceiveSize <Unlimited>]
 [-MaxSendSize <Unlimited>]
 [-OnPremisesObjectId <Guid>]
 [-OverrideRecipientQuotas]
 [-RejectMessagesFrom <DeliveryRecipientIdParameter[]>]
 [-RequireSenderAuthenticationEnabled <Boolean>]
 [-WhatIf]
 [-WindowsEmailAddress <SmtpAddress>]
 [<CommonParameters>]

Parameters (37)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the unique name of the mail-enabled public folder. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-Alias String yes The Alias parameter specifies the Exchange alias (also known as the mail nickname) for the recipient. This value identifies the recipient as a mail-enabled object, and shouldn't be confused with multiple email...
-EntryId String yes This parameter is reserved for internal Microsoft use.
-AcceptMessagesOnlyFrom DeliveryRecipientIdParameter[] The AcceptMessagesOnlyFrom parameter specifies who is allowed to send messages to this recipient. Messages from other senders are rejected.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-Contacts RecipientIdParameter[] The Contacts parameter specifies the contacts for the public folder. Contacts are persons about whom you can save several types of information, such as addresses, telephone numbers, and web page URLs.
-CustomAttribute1 String This parameter specifies a value for the CustomAttribute1 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute10 String This parameter specifies a value for the CustomAttribute10 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute11 String This parameter specifies a value for the CustomAttribute11 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute12 String This parameter specifies a value for the CustomAttribute12 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute13 String This parameter specifies a value for the CustomAttribute13 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute14 String This parameter specifies a value for the CustomAttribute14 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute15 String This parameter specifies a value for the CustomAttribute15 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute2 String This parameter specifies a value for the CustomAttribute2 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute3 String This parameter specifies a value for the CustomAttribute3 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute4 String This parameter specifies a value for the CustomAttribute4 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute5 String This parameter specifies a value for the CustomAttribute5 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute6 String This parameter specifies a value for the CustomAttribute6 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute7 String This parameter specifies a value for the CustomAttribute7 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute8 String This parameter specifies a value for the CustomAttribute8 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-CustomAttribute9 String This parameter specifies a value for the CustomAttribute9 property on the recipient. You can use this property to store custom information about the recipient, and to identify the recipient in filters. The maximum...
-DeliverToMailboxAndForward Boolean The DeliverToMailboxAndForward parameter specifies the message delivery behavior when a forwarding address is specified by the ForwardingAddress parameter. Valid values are:
-DisplayName String The DisplayName parameter specifies the display name of the mail-enabled public folder. The display name is visible in the Exchange admin center, in address lists, and in Outlook. The maximum length is 256...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-EmailAddresses ProxyAddress[] The EmailAddresses parameter specifies all email addresses (proxy addresses) for the recipient, including the primary SMTP address. In on-premises Exchange organizations, the primary SMTP address and other proxy...
-ExternalEmailAddress SmtpAddress The ExternalEmailAddress parameter specifies an email address outside the organization.
-ForwardingAddress RecipientIdParameter The ForwardingAddress parameter specifies a forwarding address for messages that are sent to this mail-enabled public folder. A valid value for this parameter is a recipient in your organization. You can use any...
-GrantSendOnBehalfTo RecipientIdParameter[] The GrantSendOnBehalfTo parameter specifies who can send on behalf of this mail-enabled public folder. Although messages send on behalf of the public folder clearly show the sender in the From field (`<Sender> on...
-HiddenFromAddressListsEnabled SwitchParameter The HiddenFromAddressListsEnabled switch specifies that this recipient is not visible in address lists. You don't need to specify a value with this switch.
-MaxReceiveSize Unlimited The MaxReceiveSize parameter specifies the maximum size of a message that can be sent to the mail-enabled public folder. Messages larger than the maximum size are rejected.
-MaxSendSize Unlimited The MaxSendSize parameter specifies the maximum size of a message that can be sent by the mail-enabled public folder.
-OnPremisesObjectId Guid The OnPremisesObjectId parameter specifies the GUID of the on-premises mail-enabled public folder that's used to create the mail-enabled public folder object in Exchange Online.
-OverrideRecipientQuotas SwitchParameter This parameter is reserved for internal Microsoft use.
-RejectMessagesFrom DeliveryRecipientIdParameter[] The RejectMessagesFrom parameter specifies who isn't allowed to send messages to this recipient. Messages from these senders are rejected.
-RequireSenderAuthenticationEnabled Boolean The RequireSenderAuthenticationEnabled parameter specifies whether to accept messages only from authenticated (internal) senders. Valid values are:
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.
-WindowsEmailAddress SmtpAddress The WindowsEmailAddress parameter specifies the Windows email address for this recipient. This is a common Active Directory attribute that's present in all environments, including environments without Exchange. Using...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.