• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Comprehensive IT Guides for Pros and Enthusiasts

MENUMENU
  • HOME
  • ALL TOPICS
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Tools
    • Virtualization
    • Web
    • Windows
  • ABOUT
  • SUBSCRIBE
Home » List All AutoMapped mailboxes in Exchange 2013, 2016 and 2019

List All AutoMapped mailboxes in Exchange 2013, 2016 and 2019

May 24, 2020 - by Zsolt Agoston - last edited on May 24, 2020

When access to a mailbox in Exchange 2013-2019 is assigned, by default the mailbox is auto-mapped to the trustee's profile. That means if Alice gets access to Peter's mailbox, Alice will see her colleague's mailbox appearing automatically in her Outlook window.

Now let's say Alice doesn't want Peter's mailbox to be present in her Outlook all the time, she wants to add it manually from time-to-time. It is possible to disable automapping, but this property cannot be changed after the permissions are assigned. We need to remove her access rights and add it back with automapping set to false.

Automapping cannot be changed after it is set: the access rights need to be removed and re-added with the correct automapping attribute: Add-MailboxPermission … -AutoMapping:$false (or true)

List Automapped mailboxes

Now, if it is not possible to amend AutoMapping attibutes, is it at least possible to query which user has which mailboxes automapped?

Fortunately, yes. The user account has an extended property, called msExchDelegateListLink, that contains all the users who has his/her mailbox automapped to their profiles.

Here is a quick one-liner to list this data. Note, that msExchDelegateListLink contains an array if there are multiple people having access to the particular user, also the users are presented with their distinguished name.

Get-ADUser -Filter * -Properties msExchDelegateListLink | ?{$_.msExchDelegateListLink -ne ""} | select Name, msExchDelegateListLink
Name        msExchDelegateListLink
----        ----------------------
Alice       {CN=Peter Carrey,CN=Users,DC=AlwaysHotCafe,DC=com}
John Cash   {CN=Alice,CN=Users,DC=AlwaysHotCafe,DC=com}
Kevin Smith {CN=Alice,CN=Users,DC=AlwaysHotCafe,DC=com}
Kim Taylor  {CN=Peter Carrey,CN=Users,DC=AlwaysHotCafe,DC=com, CN=Alice,CN=Users,DC=AlwaysHotCafe,DC=com}

Get a Formatted List

To get a more usable output, this more sophisticated script retrieves the delegate list expanded, showing their UserPrincipalName instead of distinguished name, in a CSV format.

Get-ADUser -Filter * -Properties msExchDelegateListLink | ?{$_.msExchDelegateListLink -ne ""} | %{
	$mailbox = $_.UserPrincipalName
	$_.msExchDelegateListLink | %{
		$user = (Get-ADUser $_).UserPrincipalName
		[pscustomobject]@{Mailbox=$mailbox; Trustee=$user} | export-csv AutoMappedMailboxes.csv -Append -NoTypeInformation
	}
}

AutoMappedMailboxes.csv

List All AutoMapped mailboxes in Exchange 2013, 2016 and 2019

Verify in Outlook

In this output - for instance - we see that Alice has the following mailboxes auto-mapped in her Outlook: John Cash, Kevin Smith and Kim Taylor.

Let's check if that's truly the case

List All AutoMapped mailboxes in Exchange 2013, 2016 and 2019

Reader Interactions

Comments Cancel reply

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

Primary Sidebar

Tools

Secondary Sidebar

CONTENTS

  • List Automapped mailboxes
  • Get a Formatted List
  • Verify in Outlook

  • Terms of Use
  • Disclaimer
  • Privacy Policy
Manage your privacy

To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.

Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}
Manage your privacy
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}