19.2 New-DRAOnlineMailbox

Synopsis

Creates a online shared mailbox in the Exchange Online.

Syntax

New-DRAOnlineMailbox -Tenant <String> Name <String> [-Shared
<SwitchParameter>] [-UserPrincipalName <String>] [-Alias <String>] [-
DisplayName <String>] [-FirstName <String>][-LastName <String>]-
properties <Hashtable>

Description

The New-DRAOnlineMailbox cmdlet creates a shared mailbox in Exchange Online. The requesting user must have the Create Online Shared Mailbox and Modify All Properties permissions or a custom permission with the necessary rights for the requested attributes. Use the Properties parameter to specify the values to use when creating the online shared mailbox.

Parameters

Attribute / Description

Parameters / Values

Required

Position

Default Value

Accept Pipeline input?

Accept wildcard characters?

Name <String>

The unique name of the onpremises user and the associated online mailbox in the cloud-based service.

true

named

 

true (ByPropertyName)

false

Properties <Hashtable>

A hashtable of property values. The key is the name of a defined attribute in the REST interface. For example: -Properties@{Attribute1DRADisplayN ame="my value"; Attribute2DRADisplayNam e=value}

Multiple values are specified as a comma-separated list.

For example: -Properties @{Attribute1DRADisplayN ame=value1, value2}

If the property name contains non-alphanumeric characters it needs to be quoted.

For example: -Properties @{"Attribute1-DRADisplayName"=value}

If the property value contains a quote it needs to be escaped with a backtick (`).

For example: -Properties @{Attribute1DRADisplayN ame="`"sample`" value"}

true

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.

true

named

 

true (ByPropertyName)

false

UserPrincipalName [<String>]

The login name for the onpremises user account. The UPN uses an email address format: username@domain.com Typically, 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 onpremises user account.

false

named

 

true (ByPropertyName)

false

DisplayName [<String>]

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

 

true (ByPropertyName)

false

FirstName [<String>]

The user's first name.

false

named

 

true (ByPropertyName)

false

LastName [<String>]

The user’s last name.

false

named

true (ByPropertyName)

false

NOTE:For more information, type "Get-Help New-DRAOnlineMailbox -detailed". For technical information, type "Get-Help New-DRAOnlineMailbox -full".

Example 19-3 1

PS C:\\>New-DRAOnlineMailbox -Tenant MyTenant -Shared -Name
"MySharedMailbox" -PrimarySmtpAddress
"MySharedMailbox@MyTenant.online.com"

This example creates an online shared mailbox named "MySharedMailbox" in Exchange Online using the DisplayName and PrimarySmtpAddress properties.

Example 19-4 2

PS C:\\>New-DRAOnlineMailbox -Tenant MyTenant -Shared -Name
"MySharedMailbox\" -PrimarySmtpAddress
"MySharedMailbox@MyTenant.online.com" -Properties
@{Office365SendAsAdd=\"CN=a89cc7f6-1e9f-41fc-9715-
f3e27fb1f4cb,AZ=3d562c8d-1d55-45ae-8288-7b58486bad44\",\"CN=9930F390-27CE-
4D90-88E9-955D8A8FFD37,az=0fa60a63-c83d-41b7-b600-202185e8db05\"}

This example creates an online shared mailbox named "MySharedMailbox" in Exchange Online using multiple properties, including adding the "send as" permission for trustees. The shared mailbox will be created in the tenant "MyTenant."