Commands › Exchange Online
New-RemoteMailbox
Create a mail user in the on-premises Active Directory and also create an associated mailbox in the cloud-based service.
Quick start script
# New-RemoteMailbox — 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-RemoteMailbox
$before | Format-List
# 3. Make the change (dry run first)
New-RemoteMailbox -Name <String> -AccountDisabled <SwitchParameter> -Equipment <SwitchParameter> -WhatIf
New-RemoteMailbox -Name <String> -AccountDisabled <SwitchParameter> -Equipment <SwitchParameter>
# 4. Verify and diff
$after = Get-RemoteMailbox
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 5 parameter sets
Default
New-RemoteMailbox [-Name] <String> -Password <SecureString> -UserPrincipalName <String>
[-ACLableSyncedObjectEnabled]
[-Alias <String>]
[-Archive]
[-Confirm]
[-DisplayName <String>]
[-DomainController <Fqdn>]
[-FirstName <String>]
[-ImmutableId <String>]
[-Initials <String>]
[-LastName <String>]
[-ModeratedBy <MultiValuedProperty>]
[-ModerationEnabled <Boolean>]
[-OnPremisesOrganizationalUnit <OrganizationalUnitIdParameter>]
[-PrimarySmtpAddress <SmtpAddress>]
[-RemotePowerShellEnabled <Boolean>]
[-RemoteRoutingAddress <ProxyAddress>]
[-ResetPasswordOnNextLogon <Boolean>]
[-SamAccountName <String>]
[-SendModerationNotifications <TransportModerationNotificationFlags>]
[-WhatIf]
[<CommonParameters>]
Room
New-RemoteMailbox [-Name] <String> [-Password <SecureString>] [-Room] [-UserPrincipalName <String>]
[-ACLableSyncedObjectEnabled]
[-Alias <String>]
[-Archive]
[-Confirm]
[-DisplayName <String>]
[-DomainController <Fqdn>]
[-FirstName <String>]
[-ImmutableId <String>]
[-Initials <String>]
[-LastName <String>]
[-ModeratedBy <MultiValuedProperty>]
[-ModerationEnabled <Boolean>]
[-OnPremisesOrganizationalUnit <OrganizationalUnitIdParameter>]
[-PrimarySmtpAddress <SmtpAddress>]
[-RemotePowerShellEnabled <Boolean>]
[-RemoteRoutingAddress <ProxyAddress>]
[-ResetPasswordOnNextLogon <Boolean>]
[-SamAccountName <String>]
[-SendModerationNotifications <TransportModerationNotificationFlags>]
[-WhatIf]
[<CommonParameters>]
Equipment
New-RemoteMailbox [-Name] <String> [-Equipment] [-Password <SecureString>] [-UserPrincipalName <String>]
[-ACLableSyncedObjectEnabled]
[-Alias <String>]
[-Archive]
[-Confirm]
[-DisplayName <String>]
[-DomainController <Fqdn>]
[-FirstName <String>]
[-ImmutableId <String>]
[-Initials <String>]
[-LastName <String>]
[-ModeratedBy <MultiValuedProperty>]
[-ModerationEnabled <Boolean>]
[-OnPremisesOrganizationalUnit <OrganizationalUnitIdParameter>]
[-PrimarySmtpAddress <SmtpAddress>]
[-RemotePowerShellEnabled <Boolean>]
[-RemoteRoutingAddress <ProxyAddress>]
[-ResetPasswordOnNextLogon <Boolean>]
[-SamAccountName <String>]
[-SendModerationNotifications <TransportModerationNotificationFlags>]
[-WhatIf]
[<CommonParameters>]
Shared
New-RemoteMailbox [-Name] <String> [-Shared] [-Password <SecureString>] [-UserPrincipalName <String>]
[-ACLableSyncedObjectEnabled]
[-Alias <String>]
[-Archive]
[-Confirm]
[-DisplayName <String>]
[-DomainController <Fqdn>]
[-FirstName <String>]
[-ImmutableId <String>]
[-Initials <String>]
[-LastName <String>]
[-ModeratedBy <MultiValuedProperty>]
[-ModerationEnabled <Boolean>]
[-OnPremisesOrganizationalUnit <OrganizationalUnitIdParameter>]
[-PrimarySmtpAddress <SmtpAddress>]
[-RemotePowerShellEnabled <Boolean>]
[-RemoteRoutingAddress <ProxyAddress>]
[-ResetPasswordOnNextLogon <Boolean>]
[-SamAccountName <String>]
[-SendModerationNotifications <TransportModerationNotificationFlags>]
[-WhatIf]
[<CommonParameters>]
1 more parameter sets — see the parameter table below.
Parameters (27)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.