Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

List managed users in Exchange 2010

Posted on 2014-12-16
13
81 Views
Last Modified: 2014-12-17
I want to list all users "managed" by a certain user in Exchange 2010. Is this possible?
0
Comment
Question by:Harold
  • 7
  • 6
13 Comments
 
LVL 24

Assisted Solution

by:VB ITS
VB ITS earned 500 total points
ID: 40502697
The Manager field is an AD attribute, not Exchange so no need to use the Exchange server to do this.

The below code snippet will list all users that have John Smith set as their Manager. John's account is located in the Company\Users OU in Active Directory Users and Computers. Domain name is simply company.com

Log into your DC, open PowerShell then type in the following:
Import-Module ActiveDirectory
Get-ADUser -Filter {Manager -eq "CN=John Smith,OU=Users,OU=Company,DC=company,DC=com"} | fl Name

Open in new window

0
 
LVL 1

Author Comment

by:Harold
ID: 40502860
VB ITS: I'm confused, from the Exchange GUI is where I set the Management of a user to manage another e-mail account, why would the information not come from the Exchange server? This is Windows 2003 too, don't see PowerShell.
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40503552
My apologies, I thought you were referring to the Manager field that can be find in the user's account properties in AD.
Manager-Field-in-AD.pngJust to clarify, do you need a list of mailboxes a particular user has Full Access to? Otherwise please post a screenshot of the area that you are speaking of, just to clear up any confusion.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Author Comment

by:Harold
ID: 40503614
VB ITS: "Just to clarify, do you need a list of mailboxes a particular user has Full Access to?" Correct, we've added Management to several users that have left the company, to one user and we can't remember them all. I know they should show up in Outlook, but I'd like to be able to run a report to show me a list.
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40503650
Not a problem. Below is a command you can run in the Exchange Management Shell to achieve this. Note that you will need to replace DOMAIN\user below with your domain name and username for the user in question:
Get-Mailbox | Get-MailboxPermission | ?{($_.AccessRights -eq "FullAccess") -and ($_.User -like 'DOMAIN\user') -and ($_.IsInherited -eq $false)} | ft Identity 

Open in new window

0
 
LVL 1

Author Comment

by:Harold
ID: 40504620
VB ITS: PERFECT! can I dump these reports to a file too? Like c:\managed.txt, if so where would I put that?
0
 
LVL 24

Accepted Solution

by:
VB ITS earned 500 total points
ID: 40504649
Sure, we just add| Export-Csv -NoTypeInformation C:\Managed.csv to the end of the script and change the way it outputs the result, so the new command should look like this:
Get-Mailbox | Get-MailboxPermission | ?{($_.AccessRights -eq "FullAccess") -and ($_.User -like 'DOMAIN\user') -and ($_.IsInherited -eq $false)} | Select Identity | Export-Csv -NoTypeInformation C:\Managed.csv

Open in new window

0
 
LVL 1

Author Comment

by:Harold
ID: 40504664
VB ITS: Excellent!  One more if I may, can the output be changed to list users Managed and by whom?

I will not ask no more.
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40504691
How about this? I've removed the output to Csv line for now to prevent you from having to go and manually open it to check it has the correct output:
Get-Mailbox | Get-MailboxPermission | ?{($_.AccessRights -eq "FullAccess") -and ($_.User -like 'DOMAIN\user') -and ($_.IsInherited -eq $false)} | Select Identity,User

Open in new window

If that looks right to you just add | Export-Csv -NoTypeInformation C:\Managed.csv to the end of it to generate the .csv output file.
0
 
LVL 1

Author Comment

by:Harold
ID: 40504707
VB ITS: with last command, it's still a single user. I was wondering if the output could list all users managed and who they are managed by. Then I can go in and clean up the ones that are not needed.
0
 
LVL 24

Assisted Solution

by:VB ITS
VB ITS earned 500 total points
ID: 40504735
Ah. Well your original question was only to list mailboxes that one user has full access to. Since I'm feeling generous...
Get-Mailbox | Get-MailboxPermission | ?{($_.AccessRights -eq "FullAccess") -and ($_.IsInherited -eq $false)} | Select Identity,User

Open in new window

Does that give you the output you want? :)
0
 
LVL 1

Author Closing Comment

by:Harold
ID: 40504755
Gave first answer and more. Thanks again!!
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40504758
Glad to help.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article runs through the process of deploying a single EXE application selectively to a group of user.
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video discusses moving either the default database or any database to a new volume.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question