Exchange Shell – Finding Mailboxes With Send As And Full Access Permission…

Exchange 2007 SP1 brings the option to configure Send-As and FullAccess permission to a mailbox using the EMC. I have come across scenarios where you have to find all users with send-as permission in your organization.

Things are easy now with the help of powershell. Run the command in order to find out all users who have send-as permission assigned to mailboxes other than their own.

Get-Mailbox | Get-ADPermission | Where-Object { ($_.ExtendedRights -like “*send-as*”) -and -not ($_.User -like “nt authorityself”) }

You can customize the output to get only the fields you need.

Get-Mailbox | Get-ADPermission | Where-Object { ($_.ExtendedRights -like “*send-as*”) -and -not ($_.User -like “nt authorityself”) } | Select Identity, User

You can export the output to a CSV file.

Get-Mailbox | Get-ADPermission | Where-Object { ($_.ExtendedRights -like “*send-as*”) -and -not ($_.User -like “nt authorityself”) } | Select Identity, User | Export-CSV c:sendas.cvs

What if you want to find out all users who have FullAccess to other mailboxes in your organization.
Run the following command.

Get-Mailbox | Get-MailboxPermission | Where-Object { ($_.AccessRights -eq “*fullaccess*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “*nt authorityself*”) }

Another variation of the above request is to find to which all mailboxes a user has fullaccess. For example, I have a user named Rajith Jose. I want to know to which all mailboxes Rajith Jose have full access to. Run the following for the same

Get-Mailbox | Get-MailboxPermission | Where-Object { ($_.AccessRights -eq “*fullaccess*”) -and ($_.User -like “*rajith*”) }

You can always select the output by pipelining the above command to a select statement and export it to a csv file by using Export-CSV filepath switch.

6 Responses to “Exchange Shell – Finding Mailboxes With Send As And Full Access Permission…”

  1. Anonymous July 9, 2009 at 5:11 pm #

    Useful one Rajith. Keep up the good work.

    -Martin

    [Reply]

  2. Deepak July 31, 2009 at 10:03 pm #

    Good

    [Reply]

  3. scooby January 12, 2010 at 10:27 pm #

    Hey thanks for this post, this was a big help, do you have a exchange power shell book you recommend?

    i did change eq to LIKE in your command

    Get-Mailbox | Get-MailboxPermission | Where-Object { ($_.AccessRights -like "*fullaccess*") -and ($_.User -like "*rajith*") }

    thats how it works for me

    [Reply]

  4. Rajith Jose Enchiparambil January 13, 2010 at 8:36 am #

    Glad to know that it worked for you Scooby. Not a big fan of books. Try this free powershell videos at http://www.howexchangeworks.com/2009/09/free-powershell-videos.html It gives you a good starting point.

    [Reply]

  5. rafael February 3, 2010 at 3:44 pm #

    hey there, just wanted to mention that the csv export option above has an extension of cvs instead of csv – otherwise, exactly what I was looking for, thanks!

    -Rafael

    [Reply]

  6. Rajith Jose Enchiparambil February 3, 2010 at 4:03 pm #

    Thanks for pointing out the typo Rafael. I will amend it.

    [Reply]

Leave a Reply:

Gravatar Image