Export Send As/Send on Behalf for certain mailboxes
Hi All
We have a couple of mailboxes (HR, Marketing, Finance etc) that are used by groups, and I need to find out who has Send on Behalf/ Send As rights to them.
I know I can check them in the EMC, but this would be time consuming so I was wondering if it was possible using the Exchange shell.
I have the names of the mailboxes in a CSV (Groups.csv), and I would write something like:
Get-content D:\groups.csv | Get-Mailbox | etc etc
BUt does anyone know the commmands to actually find the Send on Behalf and Send As people?
Thanks in advance for any help. We are running Exchange 2007 SP2.
October 1st, 2011 9:00am
Here are a couple of one-liners that will report on this for all mailboxes. You can modify these to use your CSV file for input.
Send-As:
Get-Mailbox -Resultsize Unlimited | Get-ADPermission | ?{($_.ExtendedRights -like "*send-as*") -and -not ($_.User -like "nt authority\self")} | select identity,user
Send On Behalf:
Get-Mailbox -Resultsize Unlimited | ?{$_.GrantSendOnBehalfTo} | select Name,GrantSendOnBehalfTo
You'll want to use Import-CSV with your CSV file...for example, let's say the header name in your CSV file is MailboxName:
Import-CSV D:\groups.csv | select -expand MailboxName | Get-Mailbox | ...
That would pipe each name in that column to Get-Mailbox.
Mike Pfeiffer | blog: mikepfeiffer.net | twitter: @mike_pfeiffer
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2011 10:11pm