Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Topic Last Modified: 2011-08-30
Use the Connect-Mailbox cmdlet to connect a disconnected mailbox to an Active Directory user object.
Syntax
connect-Mailbox -Identity <StoreMailboxIdParameter>
-Database <DatabaseIdParameter> [-ActiveSyncMailboxPolicy
<MailboxPolicyIdParameter>] [-AddressBookPolicy
<AddressBookMailboxPolicyIdParameter>] [-Alias
<String>] [-Archive <SwitchParameter>] [-Confirm
[<SwitchParameter>]] [-DomainController <Fqdn>]
[-ManagedFolderMailboxPolicy <MailboxPolicyIdParameter>]
[-ManagedFolderMailboxPolicyAllowed <SwitchParameter>]
[-RetentionPolicy <MailboxPolicyIdParameter>] [-User
<UserIdParameter>] [-WhatIf [<SwitchParameter>]]
|
connect-Mailbox -Identity <StoreMailboxIdParameter>
-Database <DatabaseIdParameter> -ValidateOnly
<SwitchParameter> [-Confirm [<SwitchParameter>]]
[-DomainController <Fqdn>] [-WhatIf
[<SwitchParameter>]]
|
connect-Mailbox -Identity <StoreMailboxIdParameter>
-Database <DatabaseIdParameter> -Equipment
<SwitchParameter> [-ActiveSyncMailboxPolicy
<MailboxPolicyIdParameter>] [-Alias <String>] [-Confirm
[<SwitchParameter>]] [-DomainController <Fqdn>]
[-ManagedFolderMailboxPolicy <MailboxPolicyIdParameter>]
[-ManagedFolderMailboxPolicyAllowed <SwitchParameter>]
[-RetentionPolicy <MailboxPolicyIdParameter>] [-User
<UserIdParameter>] [-WhatIf [<SwitchParameter>]]
|
connect-Mailbox -Identity <StoreMailboxIdParameter>
-Database <DatabaseIdParameter> -Shared
<SwitchParameter> [-ActiveSyncMailboxPolicy
<MailboxPolicyIdParameter>] [-Alias <String>] [-Confirm
[<SwitchParameter>]] [-DomainController <Fqdn>]
[-ManagedFolderMailboxPolicy <MailboxPolicyIdParameter>]
[-ManagedFolderMailboxPolicyAllowed <SwitchParameter>]
[-RetentionPolicy <MailboxPolicyIdParameter>] [-User
<UserIdParameter>] [-WhatIf [<SwitchParameter>]]
|
connect-Mailbox -Identity <StoreMailboxIdParameter>
-Database <DatabaseIdParameter> -LinkedDomainController
<Fqdn> -LinkedMasterAccount <UserIdParameter>
[-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>] [-Alias
<String>] [-Confirm [<SwitchParameter>]]
[-DomainController <Fqdn>] [-LinkedCredential
<PSCredential>] [-ManagedFolderMailboxPolicy
<MailboxPolicyIdParameter>]
[-ManagedFolderMailboxPolicyAllowed <SwitchParameter>]
[-RetentionPolicy <MailboxPolicyIdParameter>] [-User
<UserIdParameter>] [-WhatIf [<SwitchParameter>]]
|
connect-Mailbox -Identity <StoreMailboxIdParameter>
-Database <DatabaseIdParameter> -Room <SwitchParameter>
[-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>] [-Alias
<String>] [-Confirm [<SwitchParameter>]]
[-DomainController <Fqdn>] [-ManagedFolderMailboxPolicy
<MailboxPolicyIdParameter>]
[-ManagedFolderMailboxPolicyAllowed <SwitchParameter>]
[-RetentionPolicy <MailboxPolicyIdParameter>] [-User
<UserIdParameter>] [-WhatIf [<SwitchParameter>]]
|
Detailed Description
If you link a mailbox to an existing Active Directory user object, that Active Directory user object has full access to the mailbox and all mail in the mailbox. If you use the User parameter to specify the Active Directory user account, make sure you specify the correct account. If you don't use the User parameter, we recommend that you use the ValidateOnly parameter to verify which user account the mailbox is connected to.
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Mailbox Permissions topic.
Parameters
Parameter | Required | Type | Description | ||
---|---|---|---|---|---|
Identity |
Required |
Microsoft.Exchange.Configuration.Tasks.StoreMailboxIdParameter |
The Identity parameter specifies the mailbox object in the Exchange database to connect to an Active Directory user object. This parameter doesn't specify an Active Directory object. You can use the following values:
|
||
Database |
Required |
Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter |
The Database parameter specifies the Exchange database
that contains the mailbox that you want to connect. You can use the
following
|
||
Equipment |
Required |
System.Management.Automation.SwitchParameter |
The Equipment switch specifies that the type of resource is equipment, if this mailbox is a resource mailbox. This switch is required only if you're connecting a resource mailbox. |
||
LinkedDomainController |
Required |
Microsoft.Exchange.Data.Fqdn |
The LinkedDomainController parameter specifies the domain controller in the forest where the user account resides, if this mailbox is a linked mailbox. The domain controller in the forest where the user account resides is used to get security information for the account specified by the LinkedMasterAccount parameter. This parameter is required only if you're connecting a linked mailbox. |
||
LinkedMasterAccount |
Required |
Microsoft.Exchange.Configuration.Tasks.UserIdParameter |
The LinkedMasterAccount parameter specifies the master account in the forest where the user account resides, if this mailbox is a linked mailbox. The master account is the account to which the mailbox links. The master account grants access to the mailbox. You can use one of the following values:
This parameter is required only if you're connecting a linked mailbox. |
||
Room |
Required |
System.Management.Automation.SwitchParameter |
The Room switch specifies that the type of resource is a room, if this mailbox is a resource mailbox. This switch is required only if you're connecting a resource mailbox. |
||
Shared |
Required |
System.Management.Automation.SwitchParameter |
The Shared switch specifies that you're creating a shared mailbox. A shared mailbox is a mailbox to which multiple users can log on. This mailbox isn't associated with any of the users that can log on. It's associated with a disabled user account. This switch is required only if you're connecting a shared mailbox. |
||
ValidateOnly |
Required |
System.Management.Automation.SwitchParameter |
The ValidateOnly switch tells the cmdlet to evaluate the conditions and requirements necessary to perform the operation and then reports whether the operation will succeed or fail. No changes are made when the ValidateOnly switch is used. |
||
ActiveSyncMailboxPolicy |
Optional |
Microsoft.Exchange.Configuration.Tasks.MailboxPolicyIdParameter |
The ActiveSyncMailboxPolicy parameter specifies the Microsoft ActiveSync mailbox policy to enable for the mailbox after it's connected. |
||
AddressBookPolicy |
Optional |
Microsoft.Exchange.Configuration.Tasks.AddressBookMailboxPolicyIdParameter |
The AddressBookPolicy parameter specifies the Address book policy to apply to this mailbox when it is connected. For more information about address book policies, see Understanding Address Book Policies. |
||
Alias |
Optional |
System.String |
The Alias parameter specifies the alias (mail nickname) for the mailbox after it's connected. The alias can be a combination of characters separated by a period with no intervening spaces. Don't use special characters in the alias. |
||
Archive |
Optional |
System.Management.Automation.SwitchParameter |
The Archive switch specifies whether to connect the archive mailbox. You don't have to specify a value with this switch. |
||
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch. |
||
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory. |
||
LinkedCredential |
Optional |
System.Management.Automation.PSCredential |
The LinkedCredential parameter specifies credentials to use to access the domain controller specified by the LinkedDomainController parameter. This parameter is optional, even if you're enabling a linked mailbox. |
||
ManagedFolderMailboxPolicy |
Optional |
Microsoft.Exchange.Configuration.Tasks.MailboxPolicyIdParameter |
The ManagedFolderMailboxPolicy parameter specifies a managed folder policy object for the mailbox. |
||
ManagedFolderMailboxPolicyAllowed |
Optional |
System.Management.Automation.SwitchParameter |
The ManagedFolderMailboxPolicyAllowed switch bypasses the warning that messaging records management (MRM) features aren't supported for e-mail clients using versions of Microsoft Outlook earlier than Office Outlook 2007. When a managed folder mailbox policy is assigned to a mailbox using the ManagedFolderMailboxPolicy parameter, the warning appears by default unless the ManagedFolderMailboxPolicyAllowed switch is used.
|
||
RetentionPolicy |
Optional |
Microsoft.Exchange.Configuration.Tasks.MailboxPolicyIdParameter |
The RetentionPolicy parameter specifies the name of a retention policy that you want applied to this mailbox. Retention policies consist of tags that are applied to mailbox folders and mail items to determine the period of time that the items should be retained. |
||
User |
Optional |
Microsoft.Exchange.Configuration.Tasks.UserIdParameter |
The User parameter specifies the user object in Active Directory to which you want to connect the Exchange mailbox object. If you don't specify this parameter, the command uses the LegacyExchangeDN and DisplayName attributes of the Exchange mailbox object to find a user account that matches the mailbox object. If it can't find a unique match, it doesn't connect the mailbox. |
||
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch. |
Input Types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.
Return Types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.
Examples
EXAMPLE 1
This example connects John Evans' (john@contoso.com) disconnected mailbox. It doesn't specify a user object to connect the mailbox to, so the command attempts to find a uniquely matched user object to connect the mailbox to.
Copy Code | |
---|---|
Connect-Mailbox -Database "Mailbox Database" -Identity "John Evans" |
EXAMPLE 2
This example connects a linked mailbox.
Copy Code | |
---|---|
Connect-Mailbox -Identity "John Evans" -Database "MBXDB02" -LinkedDomainController FabrikamDC01 -LinkedMasterAccount john@fabrikam.com |
EXAMPLE 3
This example connects an equipment mailbox.
Copy Code | |
---|---|
Connect-Mailbox -Identity "CAR001" -Database "MBXResourceDB" -Equipment -User "CAR001" |
EXAMPLE 4
This example connects a room mailbox.
Copy Code | |
---|---|
Connect-Mailbox -Identity "ConfRm212" -Database "MBXResourceDB" -Room -User "Conference Room 212" |