Solved

List managed users in Exchange 2010

Posted on 2014-12-16
13
79 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
 
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
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 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

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.

Question has a verified solution.

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

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
how to add IIS SMTP to handle application/Scanner relays into office 365.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now