Get in touch with us!

PowerShell script for auto mapping shared mailboxes

Hello folks,

You have probably, more than once, explained the pros and cons on the different ways to assign permissions to Shared Mailboxes in Exchange and Exchange Online / Office 365?

The problem

You have two ways to go:

– The group method

This includes creating a group, assign members to it and assign Full Access and Send As permissions to the Shared Mailbox. This is the simple and probably most correct way to assign permissions for end users to the Shared Mailboxes. However, it has one big drawback, you won’t get any auto mapping in Outlook. Bummer.

– The nasty “assign permissions directly to the Shared Mailbox ACL” method

This means you add the users directly into the ACL of the Shared Mailbox. Well, pretty simple to manage, at least if you just have a few Shared Mailboxes, but what if you have thousands of them? You won’t have a simple way to look at a user account and tell which Shared Mailboxes this particular user have access to. However, you will get the famous auto mapping feature of Outlook!

So, the IT department need to choose between having the flu or to have constant headache and that’s not an easy choice. But there is a solution.

The solution

I have create a script that reads the membership from groups and add the members to the respective Shared Mailboxes which means that you get what you want. Both simple management and auto mapping in Outlook.

To use my solution a couple of things needs to be in place. You need to have a correlation between the security group and the Shared Mailboxes. This means that by looking at the security group, you must have a way to, with 100% accuracy, find the corresponding Shared Mailbox.

In my case there is a prefix and suffix on the group names that is stripped to get the samaccountname of the Shared Mailbox. Look in the code and you will understand.

The script connects, find the first group, strip off the prefix and suffix and the finds the Shared Mailbox. At that point the group membership and the Shared Mailbox ACL list is compared to get a list of differences, which in the next step is corrected.

This script can, of course, be used against Office 365 with just small modification.

The script also creates a log file. It will, however, not fill up your hard drive as it only keep two 10 Mb logfiles.

Sounds good? You find the script here: https://gallery.technet.microsoft.com/PowerShell-script-for-fe189ccc

Need help? Contact me at magnus.goransson@altitude365.com

By Magnus Göransson

 

4 Comments

  1. Corey Zamara

    It’s not quite clear, how can you use this for Office365?

    Reply
  2. Anuj Sharma

    Helpful.

    Reply
  3. James Miller

    Pretty good post. I found your website just right for my needs. Thanks for sharing the great information. Good Luck!

    Reply
  4. Stefan

    thanks fopr sharing at TECHNET GALLERY but I read a lot of complaints that the script is not working right. Can you enlighten us/them?

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Starkare tillsammans

Bolag inom både publik och offentlig sektor efterfrågar en alltmer kostnadseffektiv, platsoberoende och säker digital arbetsplats. Därför går nu Altitude 365 och Uclarity samman och bildar ett gemensamt specialistbolag.
Fortsätt på Altitude 365Kolla in Exobe

Altitude 365 + Uclarity – Årets Modern Work Partner!

Vinnaren är ett bra exempel på hur en “Born in the Cloud” ständigt förbättrar sitt erbjudande, arbetar nära och proaktivt med Microsoft för att hjälpa kunderna på deras digitaliseringsresa. Plus att vi på Microsoft verkligen ser fram mot den nya bolags-konstellationen (Altitude 365 + Uclarity) för ett “Starkare Tillsammans”.

Uclarity och Altitude 365 - Starkare tillsammans

Uclarity är specialister på digitala möten, telefoni, kontaktcenter och digitalt arbetssätt. Altitude 365 är specialister på säkerhet, mobilitet och hur bolag kan optimera resan till Microsoft365. Nu gör vi gemensam sak och bildar bolag tillsammans.

– Pandemin har tydliggjort behoven av en modern digital arbetsplats och vi har diskuterat ett samgående med Altitude 365 under en längre tid. Våra kunder har behov av specialistkompetens och tillsammans blir vi en ledande specialist inom Digital Workplace-området, säger Niklas Olsson Hellström, VD Uclarity AB.

Tommy Clark, Partner, Altitude 365, kommenterar:
– Inget bolag köper det andra utan båda bolagen får lika stora delar i det nya bolaget. Vår ledstjärna är att vi blir starkare tillsammans och att vi kan hjälpa våra kunder under hela deras resa.
Målet med sammanslagningen är att kunna hjälpa kunder med både teknik och effektiva arbetssätt.

– Det är då våra kunder får önskad effekt av sin investering i den digitala arbetsplatsen, säger Niklas Olsson Hellström.

Båda bolagen har svenska och internationella kunder från både privat och offentlig sektor. Sammanslagningen resulterar i en organisation på 50+ anställda baserade i Stockholm, Örebro och Göteborg.

För frågor, vänligen kontakta;
Tommy Clarke, Partner, Altitude 365 AB, 0703-593854, tommy.clarke@altitude365.com
Niklas Olsson Hellström, VD, Uclarity AB, 0734-198016, niklas.olsson@uclarity.com

Fortsätt på Altitude 365Kolla in Exobe