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?
 
timgreen7077Connect With a Mentor Exchange 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
 
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
 
timgreen7077Connect With a Mentor Exchange 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
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.