Solved

List shared mailboxes and users with access to them

Posted on 2014-04-14
3
798 Views
Last Modified: 2014-05-09
Experts,

I need help with a script to list all shared mailboxes in Exchange 2010 SP2 organizations along with a list of users having access to that mailbox.
For example user1 delegated his mailbox to user3, user7, so the report will produce similar output "User1: User3, User7"

The format can be anything readable, does not have to be on a single line. I have searched for such scripts on EE< nothing worked for me. I need to run it on about 200 users most of them have shared their mailboxes with others.

Appreciate your help.
0
Comment
Question by:Coffinated
[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
3 Comments
 
LVL 3

Assisted Solution

by:petekdoku
petekdoku earned 250 total points
ID: 39999495
Hi,

get-mailbox  | where-object {$_.recipienttypedetails -like "*shared*"} | get-mailboxpermi
ssion | where-object {$_.accessrights -like "*full*" } | ft identity, user

identity: the shared mailbox name.
user: full access to that shared mailbox.
0
 
LVL 5

Author Comment

by:Coffinated
ID: 39999852
petekdolu

It does not print any results

[PS] C:\Users\Administrator\desktop>Get-Mailbox | Where-Object {$_.RecipientTypeDetails -like "*shared*"} | Get-MailboxPermission | Where-Object {$_.AccessRights -like "*full"} | ft identity,user
WARNING: By default, only the first 1000 items are returned. Use the ResultSize parameter to specify the number of items returned. To return all items, specify "-ResultSize Unlimited". Be aware that, depending on the actual number of items, returning all items can take a long time and consume a large amount of memory. Also, we don't recommend storing the results in a variable. Instead, pipe the results to another task or script to perform batch changes.
[PS] C:\Users\Administrator\desktop>
0
 
LVL 14

Accepted Solution

by:
Justin Yeung earned 250 total points
ID: 39999953
add

-Resultsize Unlimited

after

Get-Mailbox

and before

| where-object

since by default limit is 1000 and you have more than 1000 mailboxes.

and in fact I think it is better to filter it before hand.
$Mailboxes = Get-Mailbox -Resultsize Unlimited -Filter {RecipientTypeDetails -eq "SharedMailbox"} 
foreach ($mailbox in $mailboxes)
{
Get-MailboxPermission $Mailbox.Name | ? {$_.AccessRights -like "*FullAccess*"} | Select-Object @{N="Mailbox Name";E={$Mailbox.Name}},User
}

Open in new window


 {RecipientTypeDetails -eq "SharedMailbox"}  = The Mailbox Attribute is SharedMailbox, if you have no sharedmailbox under your exchange, you will have no return.
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video discusses moving either the default database or any database to a new volume.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

718 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