Solved

List shared mailboxes and users with access to them

Posted on 2014-04-14
3
751 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
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
how to add IIS SMTP to handle application/Scanner relays into office 365.
This video discusses moving either the default database or any database to a new volume.

823 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