• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

Generate a list of mailboxes a specific person has any access to

I've got some scripts for Exchange PowerShell but was actually wondering if it's possible to list any permission (Full Access or Send As) that a specific user or group has access to?

I have these scripts for generating lists in general:

How to generate a list of who has access to a mailbox (author: LindyS):
Get-Mailbox -resultsize "Unlimited" | Get-MailboxPermission | where { ($_.IsInherited -eq $false) } | where { ($_.User -notlike 'NT AUTHORITY\SELF') } | ft @{Name="Mailbox";expression={($_.Identity )}}, User,AccessRights -autosize | Out-File mailboxrights.txt -Width 375

Open in new window


Generate a list of mailboxes with Send As permission (Author: premglitz):
Get-Mailbox | Get-ADPermission | where { ($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Select Identity, User, Deny | Export-CSV test.csv

Open in new window

0
garryshape
Asked:
garryshape
  • 3
  • 2
1 Solution
 
Mahmoud SabryCommented:
use this command

get-mailbox | %{$foo = $_; Get-MailboxPermission $foo | ?{$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}} | ft {$foo},User,AccessRights
0
 
Mahmoud SabryCommented:
and for send as

Get-Mailbox | ?{ $_.GrantSendOnBehalfto -ne ""} | fl name,GrantSendOnBehalfto
0
 
garryshapeAuthor Commented:
Does that ask for input or do you specify the mailbox you're querying when putting in the command?
0
 
Mahmoud SabryCommented:
this give you report with all mailboxes in the domain

if your mailboxes larger than 1000 mailbox, then u need to add -resultsize 500000 after Get-Mailbox
0
 
garryshapeAuthor Commented:
Ah ok, do you think it's possible though to run the script to check against one particular user/group mailbox?
So say I don't want a whole list of the company, but instead just a report for permissions that "JSmith@domain.com" or group "ADSecurityGroup" has access to, anyway to run with those terms?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now