Creates an on-premises object with an associated mailbox in the cloud-based service.
New-DRARemoteMailbox [-Properties <Hashtable>] -Domain <String> -Name <String> [-Password <SecureString>] [-UserPrincipalName <String>] [-Alias <String>] [-Archive <SwitchParameter>] [-DisplayName <String>] [-FirstName <String>] [-Initials <String>] [-LastName <String>] [-SamAccountName <String>] [-AccountDisabled <SwitchParameter>] -OnPremisesOrganizationalUnit <String> [-RemoteRoutingAddress <String>] [-ResetPasswordOnNextLogon <Boolean>] [-LicensingGroup <String>] [-ACLableSyncedObjectEnabled <SwitchParameter>] [-PrimarySmtpAddress <String>] [-Shared <SwitchParameter>] [-DRARestServer <String>] [-DRARestPort <Int32>] [-IgnoreCertificateErrors <SwitchParameter>] [-Force <SwitchParameter>] [-Timeout <Int32>] [<CommonParameters>]
Use the New-RemoteMailbox cmdlet to:
Create a user in the on-premises Active Directory with an associated mailbox in the cloud-based service. The requesting user must have the Create User power. The parameters LicensingGroup and RemoteRoutingAddress are mandatory. You can also specify whether to create an archive mailbox in the cloud-based service by using the Archive parameter. The requesting user must have the Create Exchange Archive Mailbox Only power.
Create an on-premises object with an associated shared mailbox in the cloud-based service. The requesting user must have the Create Shared Mailbox power. The Shared parameter is mandatory. You can also specify whether to create an archive mailbox in the cloud-based service by using the Archive parameter. The requesting user must have the Create Exchange Archive Mailbox Only power.
Attribute / Description |
Parameters / Values |
||||
---|---|---|---|---|---|
Required |
Position |
Default Value |
Accept Pipeline input? |
Accept wildcard characters? |
|
Properties [<Hashtable>] A hashtable of property values. The key is the name of a defined attribute in the REST interface. For example: -Properties @{Attribute1DRADisplayName="my value"; Attribute2DRADisplayName=value} Multiple values are specified as a comma-separated list.For example: -Properties @{Attribute1DRADisplayName=value1, value2} If the property name contains non-alphanumeric characters it needs to be quoted.For example: -Properties @{"Attribute1-DRA-DisplayName"=value} If the property value contains a quote it needs to be escaped with a backtick (`).For example: -Properties @{Attribute1DRADisplayName="`"sample`" value"} |
false |
named |
|
true (ByPropertyName) |
false |
Domain <String> The domain of the object in FQDN format. For example: mydomain.corp |
true |
named |
|
true (ByPropertyName) |
false |
Name <String> The unique name of the on-premises user and the associated mailbox in the cloud-based service. |
true |
named |
|
true (ByPropertyName) |
false |
Password [<SecureString>] The password that is used by the on-premises user to secure the account and the associated mailbox in the cloud-based service. |
false |
named |
|
true (ByPropertyName) |
false |
UserPrincipalName [<String>] The login name for the on-premises user account. The UPN uses an email address format: username@domain.comTypically, the domain value is the domain where the on-premises user account resides. |
false |
named |
|
true (ByPropertyName) |
false |
Alias [<String>] The Exchange alias (also known as the mail nickname) for the on-premises user account. |
false |
named |
|
true (ByPropertyName) |
false |
Archive [<SwitchParameter>] The Archive switch specifies whether to create an archive mailbox in the cloud-based service. |
false |
named |
|
true (ByPropertyName) |
false |
DisplayName [<String>] The display name of the user and the associated mailbox in the cloud-based service. |
false |
named |
|
true (ByPropertyName) |
false |
FirstName [<String>] The user's first name. |
false |
named |
|
true (ByPropertyName) |
false |
Initials [<String>] The user's middle initials. |
false |
named |
|
true (ByPropertyName) |
false |
LastName [<String>] The user's last name. |
false |
named |
|
true (ByPropertyName) |
false |
SamAccountName [<String>] The login name (pre-Windows 2000) that is compatible with older versions of Microsoft Windows client and server operating systems. |
false |
named |
|
true (ByPropertyName) |
false |
AccountDisabled [<SwitchParameter>] The AccountDisabled switch specifies whether to create the user in a disabled state. |
false |
named |
|
true (ByPropertyName) |
false |
OnPremisesOrganizationalUnit <String> The organizational unit (OU) in the on-premises organization in which the new mailbox is added. Valid input is a distinguished name or a canonical name. |
true |
named |
|
true (ByPropertyName) |
false |
RemoteRoutingAddress [<String>] The SMTP address of the mailbox in the cloud-based service that the on-premises user is associated with.
|
false |
named |
|
true (ByPropertyName) |
false |
ResetPasswordOnNextLogon [<Boolean>] The ResetPasswordOnNextLogon parameter specifies whether the user must change their password the next time they log on. |
false |
named |
|
true (ByPropertyName) |
false |
LicensingGroup <String> The licensing group that is configured in DRA to enforce office 365 licenses. Valid input is a distinguished name or a canonical name. |
true |
named |
|
true (ByPropertyName) |
false |
ACLableSyncedObjectEnabled [<Nullable`1>] The ACLableSyncedObjectEnabled switch specifies whether the remote mailbox is an ACLableSyncedMailboxUser. |
false |
named |
|
true (ByPropertyName) |
false |
PrimarySmtpAddress [<String>] The primary return email address that is used for the recipient. |
false |
named |
|
true (ByPropertyName) |
false |
Shared [<String>] The Shared switch specifies whether the mailbox in the cloud-based service must be created as a shared mailbox. NOTE:The Shared parameter is mandatory to create a remote shared mailbox. |
false |
named |
|
true (ByPropertyName) |
false |
DRARestServer [<String>] The name of the computer running the DRA Rest Service. The requested DRA operation will execute on this server. If the parameter is not specified, the value defaults to 'localhost'. |
false |
named |
|
true (ByPropertyName |
false |
DRARestPort [<Int32>] The port where the DRA REST Service listens for requests. If the parameter is not specified, the value defaults to 8755. |
false |
named |
8755 |
true (ByPropertyName |
false |
IgnoreCertificateErrors [<SwitchParameter>] Allows the request to bypass any SSL certificate errors, such as the InvalidOperation error that occurs when the REST Service is bound to a self-signed certificate. |
false |
named |
false |
false |
|
Force [<SwitchParameter>] Suppresses any request for user input and supplies a 'yes' response. For example: -Force with a delete request will perform the delete without presenting the confirmation request to the user. |
false |
named |
|
false |
false |
Timeout [<Int32>] The number of seconds to wait before the request to the DRA REST server times out. To specify an infinite timeout, you can set this parameter to -1. |
false |
named |
100 seconds |
true (ByPropertyName) |
false |
<CommonParameters> Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
|
|
|
|
|
NOTE:For more information, type "Get-Help New-DRARemoteMailbox -detailed". For technical information, type "Get-Help New-DRARemoteMailbox -full".
Example 20-10 1
PS C:\\>New-DRARemoteMailbox -Domain MyDomain.corp -Name MyUser -UserPrincipalName MyUser@MyDomain.corp -OnPremisesOrganizationalUnit "MyDomain.corp/MyOU" -LicensingGroup "CN=MyLicensingGroup,DC=MyDomain,DC=corp"
This example creates an on-premises user named MyUser in the domain MyDomain.corp in the OU MyOU and a mailbox in the cloud-based service for the user. The parameters LicensingGroup and RemoteRoutingAddress are mandatory. The example assumes that the remote routing address policy is configured. If the RemoteRoutingAddress parameter is not specified, DRA generates the remote routing address based on the policy.
Example 20-11 2
PS C:\\>New-DRARemoteMailbox -Domain MyDomain.corp -Name MyUser -UserPrincipalName MyUser@MyDomain.corp -OnPremisesOrganizationalUnit "MyDomain.corp/MyOU" -LicensingGroup "CN=MyLicensingGroup,DC=MyDomain,DC=corp" -RemoteRoutingAddress "MyUser@MyUser.com"
This example creates an on-premises user named MyUser in the domain MyDomain.corp in the OU MyOU and a mailbox in the cloud-based service for the user. The parameters LicensingGroup and RemoteRoutingAddress are mandatory. The example assumes that the remote routing address policy is configured. Because the RemoteRoutingAddress parameter is specified, DRA ignores the configured remote routing address policy and uses the value specified for the RemoteRoutingAddress parameter.
Example 20-12 3
PS C:\\>New-DRARemoteMailbox -Domain MyDomain.corp -Name MyUser -UserPrincipalName MyUser@MyDomain.corp -OnPremisesOrganizationalUnit "MyDomain.corp/MyOU" -LicensingGroup "CN=MyLicensingGroup,DC=MyDomain,DC=corp" -Archive
This example creates an on-premises user named MyUser in the domain MyDomain.corp in the OU MyOU and an associated mailbox in the cloud-based service. It also creates the archive mailbox for the cloud-based mailbox. The parameters LicensingGroup, RemoteRoutingAddress, and Archive are mandatory. The example assumes that the remote routing address policy is configured. If the RemoteRoutingAddress parameter is not specified, DRA generates the remote routing address based on the policy. The creation of the archive mailbox in the cloud-based service is not immediate and depends on the directory synchronization schedule.
Example 20-13 4
PS C:\\>New-DRARemoteMailbox -Domain MyDomain.corp -Name MySharedUser -Alias MySharedUserAlias -OnPremisesOrganizationalUnit "MyDomain.corp/MyOU" -Shared
This example creates an on-premises object named MySharedUser in the OU MyOU in the domain MyDomain.corp and an associated shared mailbox in the cloud-based service. The parameters Shared and RemoteRoutingAddress are mandatory. The example assumes that the remote routing address policy is configured. If the RemoteRoutingAddress parameter is not specified, DRA generates the remote routing address based on the policy. The creation of the cloud-based shared mailbox is not immediate and depends on the directory synchronization schedule.
Example 20-14 5
PS C:\\>New-DRARemoteMailbox -Domain MyDomain.corp -Name MySharedUser -Alias MySharedUserAlias -OnPremisesOrganizationalUnit "MyDomain.corp/MyOU" -Shared -Archive
This example creates an on-premises object named MySharedUser in the domain MyDomain.corp in the OU MyOU and an associated shared mailbox in the cloud-based service. It also creates an archive mailbox in the cloud-based service for the mailbox. The parameters Shared, RemoteRoutingAddress, and Archive are mandatory. The example assumes that the remote routing address policy is configured. If the RemoteRoutingAddress parameter is not specified, DRA generates the remote routing address based on the policy. The creation of the cloud-based mailbox and archive mailbox is not immediate and depends on the directory synchronization schedule.