Solved

List shared mailboxes and users with access to them

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
In this video we show how to create an Address List 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 Organization >> Ad…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

707 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

12 Experts available now in Live!

Get 1:1 Help Now