Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Exporting Mailbox Permissions

$
0
0

Hi all,

In our Exchange 2007 environment, I have this Powershell script which outputs mailboxes, which users have access to them and the type of access, such as Full Access, Delete Items etc. into a column called Access Permissions.

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:\reports\FullMailboxAccessPermissions.csv"

What I would like to do is change the script to only show those who have Full Access. I have tried the command -match but then this drops the Access Permissions column which I would like to keep. Is there a way around this?

Also, there is a particular service account that has access to most mailboxes, and I would like to exclude that account from the results. Is there a way of doing that?


Viewing all articles
Browse latest Browse all 8583

Trending Articles