Answered by:
Enable-RemoteMailbox for Shared Mailboxes Problem

Question
-
In an Exchange 2016 Hybrid environment I am trying to enable an on-prem user object as a Shared mailbox.
Couple of environmental things:
1) Powershell session is being established with an on-prem Hybrid server without issue.
2) Creds I am running the script with can successfully perform a "regular" Enable-RemoteMailbox on an on-prem user object
3) $WorkingDC contains a valid FQDN for a local domain controller. I am adding this in here because this code is part of a larger automation / provision process for users and I need to make sure that DC focus is consistent.
4) The user object exists in the on-prem AD.
Here's the code I am using:
Enable-RemoteMailbox -Shared -Identity "Shared, Marlin" -Alias MShared -DisplayName "Shared, Marlin" -RemoteRoutingAddress 'MShared@mycustomer.mail.onmicrosoft.com' -PrimarySmtpAddress 'MShared@mycustomer.org' -DomainController $WorkingDC
It fails with a message telling me that the "-Shared" switch is invalid.
<o:p></o:p>
Thursday, January 16, 2020 2:58 PM
Answers
-
Hi,
Is there any update about your issue? What's the server version your customer using?
We can see the usage about the parameter -shared from the document:
Note: This switch is available only in Exchange 2013 CU21 or later and Exchange 2016 CU10 or later. To use this switch, you also need to run setup.exe /PrepareAD. For more information, see KB4133605.
The Shared switch specifies that the mailbox in the service should be created as a shared mailbox. You don't need to specify a value with this switch.
And in the KB mentioned that:
Exchange Server 2016
To enable the parameter -shared so that it will work, make sure that you prepare Active Directory by running the following command:
<path_to_Exchange2016CU10_or_LaterBuild>\setup.exe /PrepareAD /OrganizationName:”first_organization_name” /IAcceptExchangeServerLicenseTerms
And install the same build of Cumulative Update 10 for Exchange Server 2016 or a later cumulative update for Exchange Server 2016.
Regards,
Joyce Shen
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
- Edited by Joyce_ShenMicrosoft contingent staff Friday, January 17, 2020 5:27 AM
- Proposed as answer by Joyce_ShenMicrosoft contingent staff Monday, January 20, 2020 1:42 AM
- Marked as answer by JohnnyYYG Tuesday, January 21, 2020 9:28 PM
Friday, January 17, 2020 5:26 AM
All replies
-
Hello
on technet, enable-remotemailbox dont list -shared attribute
but set-remotemailbox have an attributed name -type
-Type The Type parameter specifies the type for the mailbox in the service. Valid values are: Regular Room Equipment Shared
Olivier
Thursday, January 16, 2020 3:09 PM -
Here's the reference I have been using:
https://docs.microsoft.com/en-us/powershell/module/exchange/federation-and-hybrid/enable-remotemailbox?view=exchange-psThursday, January 16, 2020 3:19 PM -
True,
your exchange is 2016 CU10 ?
- Proposed as answer by Olivier Chantraine Monday, January 27, 2020 4:06 PM
Thursday, January 16, 2020 4:00 PM -
Fair question - I am trying to get the customer to confirm what version they are actually running.Thursday, January 16, 2020 4:02 PM
-
Hi,
Is there any update about your issue? What's the server version your customer using?
We can see the usage about the parameter -shared from the document:
Note: This switch is available only in Exchange 2013 CU21 or later and Exchange 2016 CU10 or later. To use this switch, you also need to run setup.exe /PrepareAD. For more information, see KB4133605.
The Shared switch specifies that the mailbox in the service should be created as a shared mailbox. You don't need to specify a value with this switch.
And in the KB mentioned that:
Exchange Server 2016
To enable the parameter -shared so that it will work, make sure that you prepare Active Directory by running the following command:
<path_to_Exchange2016CU10_or_LaterBuild>\setup.exe /PrepareAD /OrganizationName:”first_organization_name” /IAcceptExchangeServerLicenseTerms
And install the same build of Cumulative Update 10 for Exchange Server 2016 or a later cumulative update for Exchange Server 2016.
Regards,
Joyce Shen
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
- Edited by Joyce_ShenMicrosoft contingent staff Friday, January 17, 2020 5:27 AM
- Proposed as answer by Joyce_ShenMicrosoft contingent staff Monday, January 20, 2020 1:42 AM
- Marked as answer by JohnnyYYG Tuesday, January 21, 2020 9:28 PM
Friday, January 17, 2020 5:26 AM -
Good comprehensive advice here. I was able to confirm that the customer's environment was not up to the minimum CU10.Tuesday, January 21, 2020 9:31 PM
-
Hi, glad to hear that the suggestion is helpful to you, here I will provide brief summary of this post so that other forum members could easily find useful information:
[Enable-RemoteMailbox for Shared Mailboxes Problem - summary]
Issue Symptom:
Run the command Enable-RemoteMailbox -Shared
fails with a message telling me that the "-Shared" switch is invalid.
(Possible) Cause:
Exchange server version is earlier than Exchange 2016 CU10
Solution:
Upgrade the Exchange server to the later CU version
Reference Links:
https://support.microsoft.com/en-hk/help/4133605/cmdlets-to-create-modify-remote-shared-mailbox-in-on-premises-exchange
Wednesday, January 22, 2020 8:28 AM