Solved

List managed users in Exchange 2010

Posted on 2014-12-16
13
85 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
[X]
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
  • 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

739 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