Solved

List managed users in Exchange 2010

Posted on 2014-12-16
13
82 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

685 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