Find “Send On Behalf” in Exchange 2013


After a Quest migration from GroupWise to Exchange 2013 security rights are translated from a shared calendar in GW to “Send on Behalf” in Exchange 2013. 
So how to find this mailboxes and how do I Export it to a CSV-file?
To just list this mailboxes you can use a simple command but the tricky part is to export a “multi-value property” like “GrantSendOnBehalfTo” to a CSV-file.

Command:

List mailboxes with “Send on Behalf”:

Get-Mailbox -ResultSize Unlimited | Select-Object Name, GrantSendOnBehalfTo

If you try to Export a “multi-value property”.

Get-Mailbox -ResultSize Unlimited | Select-Object Name, GrantSendOnBehalfTo | export-csv FileName.csv

Result in the FileName.csv Export

#TYPE Selected.Microsoft.Exchange.Data.Directory.Management.Mailbox
"Name","GrantSendOnBehalfTo"
"UserID1","Microsoft.Exchange.Data.Directory.ADMultiValuedProperty`1[Microsoft.Exchange.Data.Directory.ADObjectId]"
"UserID2","Microsoft.Exchange.Data.Directory.ADMultiValuedProperty`1[Microsoft.Exchange.Data.Directory.ADObjectId]"
"UserID3","Microsoft.Exchange.Data.Directory.ADMultiValuedProperty`1[Microsoft.Exchange.Data.Directory.ADObjectId]"

The way to do it:


Get-Mailbox -ResultSize Unlimited | Select-Object Name, @{Name=’GrantedTo’;Expression={[string]::join(“|”,($_.GrantSendOnBehalfTo))}} | Export-Csv -Path .\UsersOut.csv -NoTypeInformation

Comments

Popular Posts