Solved

Exporting users who have full mailbox rights on exchange 2007 mailboxes - PowerShell

Posted on 2013-11-15
4
346 Views
Last Modified: 2013-11-27
I would like to export from Exchange 2007 who has full mailbox rights to a set number of mailboxes.

I have the mailboxes in question in a spreadsheet and i would like to use this as input into my PowerShell query.

The below query will get my all mailboxes

Get-Mailbox -ResultSize unlimited | Get-MailboxPermission | where { ($_.AccessRights -match “FullAccess”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Export-csv -path "c:\output"

thanks for the help
0
Comment
Question by:cmatchett
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Subsun
ID: 39651724
Just to be clear..

Are you trying to export all mailboxes which a user has full mailbox permission?

Or to report all users who has permission on a set of mailboxes?

Or to check if a user have permission on a set of mailboxes or not?
0
 

Author Comment

by:cmatchett
ID: 39651893
I have an excel spreadsheet that contains 120 mailboxes.

My task is to get all the users who have full mailbox control on these 120 mailboxes.

I would like the powershell query to take the mailbox names from the spreadsheet and then query who has full mailbox control of it.
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39651965
Save the excel file to csv file..

For example if you have the header of csv file in following format..
Email
Mbxa@domain.com
Mbxb@domain.com
Mbxc@domain.com

Open in new window

Then try the following code..
Import-Csv C:\Input.csv | % {
Get-Mailbox $_.Email | 
	Get-MailboxPermission | 
		where {
		($_.AccessRights -match “FullAccess”) `
		-and ($_.IsInherited -eq $false) `
		-and -not ($_.User -like “NT AUTHORITY\SELF”) 
		}
} | Export-csv -path "c:\output.csv" -nti

Open in new window

0
 

Author Comment

by:cmatchett
ID: 39680128
great work, thanks very much
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
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
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…

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

18 Experts available now in Live!

Get 1:1 Help Now