Commands › Exchange Online

New-Mailbox

Exchange Online ExchangeOnlineManagement New-*

Create mailboxes and user accounts at the same time.

Quick start script

# New-Mailbox — 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-Mailbox
$before | Format-List

# 3. Make the change (dry run first)
New-Mailbox -Name <String> -AccountDisabled <SwitchParameter> -Arbitration <SwitchParameter> -WhatIf
New-Mailbox -Name <String> -AccountDisabled <SwitchParameter> -Arbitration <SwitchParameter>

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

Syntax — 21 parameter sets

User

New-Mailbox [-Name] <String> -Password <SecureString> -UserPrincipalName <String> [-InactiveMailbox <MailboxIdParameter>] [-RemovedMailbox <RemovedMailboxIdParameter>]
 [-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>]
 [-AddressBookPolicy <AddressBookMailboxPolicyIdParameter>]
 [-Alias <String>]
 [-ArbitrationMailbox <MailboxIdParameter>]
 [-Archive]
 [-ArchiveDatabase <DatabaseIdParameter>]
 [-Confirm]
 [-Database <DatabaseIdParameter>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-FirstName <String>]
 [-Force]
 [-ImmutableId <String>]
 [-Initials <String>]
 [-LastName <String>]
 [-MailboxPlan <MailboxPlanIdParameter>]
 [-MailboxRegion <String>]
 [-ManagedFolderMailboxPolicy <MailboxPolicyIdParameter>]
 [-ManagedFolderMailboxPolicyAllowed]
 [-ModeratedBy <MultiValuedProperty>]
 [-ModerationEnabled <Boolean>]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-RemotePowerShellEnabled <Boolean>]
 [-ResetPasswordOnNextLogon <Boolean>]
 [-RetentionPolicy <MailboxPolicyIdParameter>]
 [-RoleAssignmentPolicy <MailboxPolicyIdParameter>]
 [-SamAccountName <String>]
 [-SendModerationNotifications <TransportModerationNotificationFlags>]
 [-SharingPolicy <SharingPolicyIdParameter>]
 [-TargetAllMDBs]
 [-ThrottlingPolicy <ThrottlingPolicyIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

MicrosoftOnlineServicesID

New-Mailbox [-Name] <String> -Password <SecureString> -MicrosoftOnlineServicesID <WindowsLiveId> [-InactiveMailbox <MailboxIdParameter>] [-RemovedMailbox <RemovedMailboxIdParameter>]
 [-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>]
 [-AddressBookPolicy <AddressBookMailboxPolicyIdParameter>]
 [-Alias <String>]
 [-ArbitrationMailbox <MailboxIdParameter>]
 [-Archive]
 [-ArchiveDatabase <DatabaseIdParameter>]
 [-Confirm]
 [-Database <DatabaseIdParameter>]
 [-DisplayName <String>]
 [-Discovery]
 [-DomainController <Fqdn>]
 [-FirstName <String>]
 [-Force]
 [-ImmutableId <String>]
 [-Initials <String>]
 [-LastName <String>]
 [-MailboxPlan <MailboxPlanIdParameter>]
 [-MailboxRegion <String>]
 [-ManagedFolderMailboxPolicy <MailboxPolicyIdParameter>]
 [-ManagedFolderMailboxPolicyAllowed]
 [-ModeratedBy <MultiValuedProperty>]
 [-ModerationEnabled <Boolean>]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-RemotePowerShellEnabled <Boolean>]
 [-ResetPasswordOnNextLogon <Boolean>]
 [-RetentionPolicy <MailboxPolicyIdParameter>]
 [-RoleAssignmentPolicy <MailboxPolicyIdParameter>]
 [-SamAccountName <String>]
 [-SendModerationNotifications <TransportModerationNotificationFlags>]
 [-SharingPolicy <SharingPolicyIdParameter>]
 [-TargetAllMDBs]
 [-ThrottlingPolicy <ThrottlingPolicyIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

Arbitration

New-Mailbox [-Name] <String> [-Arbitration] [-Password <SecureString>] [-UserPrincipalName <String>]
 [-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>]
 [-AddressBookPolicy <AddressBookMailboxPolicyIdParameter>]
 [-Alias <String>]
 [-Archive]
 [-ArchiveDatabase <DatabaseIdParameter>]
 [-Confirm]
 [-Database <DatabaseIdParameter>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-FirstName <String>]
 [-Force]
 [-ImmutableId <String>]
 [-Initials <String>]
 [-LastName <String>]
 [-MailboxRegion <String>]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-ProxyEmailAddress <ProxyAddress>]
 [-RemotePowerShellEnabled <Boolean>]
 [-ResetPasswordOnNextLogon <Boolean>]
 [-RetentionPolicy <MailboxPolicyIdParameter>]
 [-RoleAssignmentPolicy <MailboxPolicyIdParameter>]
 [-SamAccountName <String>]
 [-SharingPolicy <SharingPolicyIdParameter>]
 [-TargetAllMDBs]
 [-ThrottlingPolicy <ThrottlingPolicyIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

AuditLog

New-Mailbox [-Name] <String> -UserPrincipalName <String> [-AuditLog]
 [-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>]
 [-AddressBookPolicy <AddressBookMailboxPolicyIdParameter>]
 [-Alias <String>]
 [-Archive]
 [-ArchiveDatabase <DatabaseIdParameter>]
 [-Confirm]
 [-Database <DatabaseIdParameter>]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-FirstName <String>]
 [-Force]
 [-ImmutableId <String>]
 [-Initials <String>]
 [-LastName <String>]
 [-OrganizationalUnit <OrganizationalUnitIdParameter>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-RemotePowerShellEnabled <Boolean>]
 [-ResetPasswordOnNextLogon <Boolean>]
 [-RetentionPolicy <MailboxPolicyIdParameter>]
 [-RoleAssignmentPolicy <MailboxPolicyIdParameter>]
 [-SamAccountName <String>]
 [-SharingPolicy <SharingPolicyIdParameter>]
 [-ThrottlingPolicy <ThrottlingPolicyIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

17 more parameter sets — see the parameter table below.

Parameters (65)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the unique name of the mailbox. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-AccountDisabled SwitchParameter yes This parameter is available only in on-premises Exchange.
-Arbitration SwitchParameter yes This parameter is available only in on-premises Exchange.
-ArchiveDomain SmtpDomain yes This parameter is available only in on-premises Exchange.
-Discovery SwitchParameter yes The Discovery switch is required to create Discovery mailboxes. You don't need to specify a value with this switch.
-EnableRoomMailboxAccount Boolean yes This parameter is functional only in on-premises Exchange.
-Equipment SwitchParameter yes The Equipment switch is required to create equipment mailboxes. You don't need to specify a value with this switch.
-FederatedIdentity String yes This parameter is available only in the cloud-based service.
-InactiveMailbox MailboxIdParameter yes This parameter is available only in the cloud-based service.
-LinkedDomainController String yes This parameter is available only in on-premises Exchange.
-LinkedMasterAccount UserIdParameter yes This parameter is available only in on-premises Exchange.
-LinkedRoom SwitchParameter yes This parameter is available only in on-premises Exchange.
-MicrosoftOnlineServicesID WindowsLiveId yes This parameter is available only in the cloud-based service.
-Migration SwitchParameter yes The Migration switch is required to create migration mailboxes. You don't need to specify a value with this switch.
-Password SecureString yes The Password parameter specifies the password for the mailbox (the user account that's associated with the mailbox). This parameter isn't required if you're creating a linked mailbox, resource mailbox, or shared...
-PublicFolder SwitchParameter yes The PublicFolder switch is required to create public folder mailboxes. You don't need to specify a value with this switch.
-RemovedMailbox RemovedMailboxIdParameter yes This parameter is available only in the cloud-based service.
-Room SwitchParameter yes The Room switch is required to create room mailboxes. You don't need to specify a value with this switch.
-Shared SwitchParameter yes The Shared switch is required to create shared mailboxes. You don't need to specify a value with this switch.
-UserPrincipalName String yes This parameter is available only in on-premises Exchange.
-ActiveSyncMailboxPolicy MailboxPolicyIdParameter The ActiveSyncMailboxPolicy parameter specifies the mobile device mailbox policy that's applied to the mailbox. You can use any value that uniquely identifies the policy. For example:.
-AddressBookPolicy AddressBookMailboxPolicyIdParameter This parameter is available only in on-premises Exchange.
-Alias String 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...
-ArbitrationMailbox MailboxIdParameter This parameter is available only in on-premises Exchange.
-Archive SwitchParameter The Archive switch specifies that an archive mailbox is created for this mailbox. You don't need to specify a value with this switch.
-ArchiveDatabase DatabaseIdParameter This parameter is available only in on-premises Exchange.
-AuditLog SwitchParameter yes This parameter is available only in on-premises Exchange.
-AuxAuditLog SwitchParameter yes This parameter is available only in on-premises Exchange.
-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.
-Database DatabaseIdParameter This parameter is available only in on-premises Exchange.
-DisplayName String The DisplayName parameter specifies the display name of the mailbox. The display name is visible in the Exchange admin center, in address lists, and in Outlook. The maximum length is 256 characters. If the value...
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-FirstName String The FirstName parameter specifies the user's first name.
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-HoldForMigration SwitchParameter The HoldForMigration switch specifies whether to prevent any client or user, except the Microsoft Exchange Mailbox Replication service (MRS) process, from logging on to a public folder mailbox. You don't need to...
-ImmutableId String The ImmutableId parameter is used by GAL synchronization (GALSync) and specifies a unique and immutable identifier in the form of an SMTP address for an Exchange mailbox used for federated delegation when requesting...
-Initials String The Initials parameter specifies the user's middle initials.
-IsExcludedFromServingHierarchy Boolean The IsExcludedFromServingHierarchy parameter prevents users from accessing the public folder hierarchy on this public folder mailbox. For load-balancing purposes, users are equally distributed across public folder...
-LastName String The LastName parameter specifies the user's last name.
-LinkedCredential PSCredential This parameter is available only in on-premises Exchange.
-MailboxPlan MailboxPlanIdParameter This parameter is available only in the cloud-based service.
-MailboxRegion String This parameter is available only in the cloud-based service.
-ManagedFolderMailboxPolicy MailboxPolicyIdParameter The ManagedFolderMailboxPolicy parameter specifies the managed folder mailbox policy to enable for the mailbox that you create.
-ManagedFolderMailboxPolicyAllowed SwitchParameter The ManagedFolderMailboxPolicyAllowed switch specifies whether to bypass the warning that messaging records management (MRM) features aren't supported for clients using versions of Microsoft Outlook earlier than...
-ModeratedBy MultiValuedProperty The ModeratedBy parameter specifies one or more moderators for this recipient. A moderator approves messages sent to the recipient before the messages are delivered. A moderator must be a mailbox, mail user, or mail...
-ModerationEnabled Boolean The ModerationEnabled parameter specifies whether moderation is enabled for this recipient. Valid value are:
-Office String The Office parameter specifies the user's physical office name or number.
-OrganizationalUnit OrganizationalUnitIdParameter The OrganizationalUnit parameter specifies the location in Active Directory where the new mailbox is created.
-Phone String The Phone parameter specifies the user's telephone number.
-PrimarySmtpAddress SmtpAddress The PrimarySmtpAddress parameter specifies the primary return email address that's used for the recipient.
-ProxyEmailAddress ProxyAddress This parameter is available only in the cloud-based service.
-RemoteArchive SwitchParameter This parameter is available only in on-premises Exchange.
-RemotePowerShellEnabled Boolean The RemotePowerShellEnabled parameter specifies whether the user has access to Exchange PowerShell. Valid values are:
-ResetPasswordOnNextLogon Boolean The ResetPasswordOnNextLogon parameter specifies whether the user is required to change their password the next time they log on to their mailbox. Valid values are:
-ResourceCapacity Int32 The ResourceCapacity parameter specifies the capacity of the resource mailbox. For example, you can use this parameter to identify the number of seats in a conference room (room mailbox) or in a vehicle (equipment...
-RetentionPolicy MailboxPolicyIdParameter This parameter is available only in on-premises Exchange.
-RoleAssignmentPolicy MailboxPolicyIdParameter The RoleAssignmentPolicy parameter specifies the role assignment policy that's applied to the mailbox. You can use any value that uniquely identifies the role assignment policy. For example:
-RoomMailboxPassword SecureString This parameter is functional only in on-premises Exchange.
-SamAccountName String This parameter is available only in on-premises Exchange.
-SendModerationNotifications TransportModerationNotificationFlags The SendModerationNotifications parameter specifies when moderation notification messages are sent. Valid values are:
-SharingPolicy SharingPolicyIdParameter This parameter is available only in on-premises Exchange.
-SupervisoryReviewPolicy SwitchParameter yes This parameter is available only in on-premises Exchange.
-TargetAllMDBs SwitchParameter This parameter is available only in the cloud-based service.
-ThrottlingPolicy ThrottlingPolicyIdParameter This parameter is available only in on-premises Exchange.
-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.

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