PowerShell Cmd to add a shared mailbox to Outlook

Is there an Exchange 2010 PowerShell command to add a shared mailbox to a user's Outlook client without the user having to add it himself?  Also is there a command to show/verify if that shared mailbox has been added or loaded into the user's Outlook client?
ei00004Network AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

timgreen7077Exchange EngineerCommented:
Yes log into the Exchange Shell and run the following:

Add-MailboxPermission -Identity "shared mailbox" -User "user" -AccessRights Fullaccess -InheritanceType all

This will grant the user full access to the shared mailbox and also automatically map the shared mailbox to the user's outlook client profile.
It normally takes about 30 minutes and the user will see the shared mailbox on the left side in outlook.
2

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ei00004Network AdministratorAuthor Commented:
Thanks, also is there a command to show/verify if that shared mailbox has been added or loaded into the user's Outlook client? Likewise is there a command to remove the shared mailbox from the user's Outlook client?
0
timgreen7077Exchange EngineerCommented:
There is no command to show when it is actually added to outlook.  That command automaps it by default, but nothing will say it's now mapped. The user will see it about 30 minutes or so after you run that command.

To remove it you run the same command but with the remove parameter:

Remove-MailboxPermission -Identity "shared mailbox" -User "user" -AccessRights Fullaccess -InheritanceType all

This will remove the shared mailbox from the user's outlook client profile, and it will no longer show after about 30 minutes or so.
1
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

timgreen7077Exchange EngineerCommented:
You can also do this in the Exchange Admin Console if you choose. See below link for assistance.

https://technet.microsoft.com/en-us/library/bb676551(v=exchg.141).aspx

This link is for Exchange 2010 but they are all pretty similar. If you need assistance because you have a different version let me know.
0
AlanConsultantCommented:
Hi Tim,

That's cool - I had no idea that was possible.

I certainly don't mean to hijack ei00004's question, but....


How does it know which of the user's profiles in Outlook to add it to?

It is not uncommon for users to have more than one Outlook profile (at least in some businesses).

So for me, for example, I have:

Alan1 - This is my test profile now
Alan2 - My usual profile (only my mailbox plus shared IT mailbox)
OpsTeam - I can see all the ops mailboxes


All three include my own mailbox, plus one or more other mailboxes.

Can we target to a specific profile using the above command or an additional parameter?

Thanks,

Alan.
0
timgreen7077Exchange EngineerCommented:
Basically you are giving the user objects mailbox account access to the other mailbox. It doesn't really care anything about outlook. as long as you are actively connected to your mailbox the shared mailbox will map. the actual outlook ost profile isn't taken into account, as long as your profile is connected to exchange.
1
AlanConsultantCommented:
Okay - Thanks for the info.

Alan.
0
timgreen7077Exchange EngineerCommented:
sure thing
0
ei00004Network AdministratorAuthor Commented:
Well I was waiting to get confirmation from the end user that the shared mailbox was added to his Outlook client, but so far I have not heard back from him and have not been able to contact him. So I'll just say it works. Thanks for your help.
0
timgreen7077Exchange EngineerCommented:
I  assure you it works. Please award points if you are satisfied and thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.