Finding messages sent to a distribution group in Exchange message tracking.

It’s pretty easy to use the get-messagetrackinglog cmdlet to find what mail was sent to a particular mailbox and by whom but what if you wanted to search for emails sent to a distribution list to make sure they were indeed being sent there.  I had a distribution list today that someone said they weren’t receiving any emails sent to it.  It was caused by another issue but the message tracking log allowed me to get a better idea of what was actually being sent to the distribution group.

capture

So if for some reason you want to find out what is being sent to a distribution group
see the PowerShell below.

Get-MessageTrackingLog -resultsize unlimited -EventID Expand | ? {$_.RelatedRecipientAddress -like "distributiongroup@domain.com"} | ft Timestamp,Sender,MessageSubject -Autosize

Mail-enable already created distribution group.

Today I had an AD administrator create a distribution group and add all the members to it in Active Directory.  They needed it enabled in Exchange so I thought easy just go into the EAC (Exchange Administrative Center) and add an existing group.  This was the case in Exchange 2007 and 2010 but not in 2013.  In order to add an existing group so you don’t have to recreate it from the EAC and add all the users back you go into EMC (Exchange Management Console).  Then once in Powershell type in the command belowmail-enable.

Enable-DistributionGroup -Identity “groupnameinAD” -Alias “groupname”
-DisplayName “displayname"

 

 

Outlook additional mailboxes and from functionality

This is an old issue that I haven’t encountered lately but I was reminded of the other day when adding a shared mailbox for a user and felt a post might help someone else out. Previously I got a request that when sending from a mailbox that had been added as additional mailboxes the from is always sent from the default mailbox not from the additional mailbox unless you go up to options and click the from button to enable the from field and change the from address as shown below.snip_20160602101231

As it is easy to forget to change the from field and kind of a pain to change every time I went on the hunt for an answer to my dilemma.  I can’t seem to find this functionality in Microsoft’s documentation anywhere, but if you add the mailbox as a new email account instead of an additional mailbox the from address will change based on what mailbox you are in when you click new email.  As in the screenshot below you can accomplish this by  going to the file tab and account settings.

snip_20160602101853

To add the mailbox click new on the email tab, then click next.  Then type in the mailbox name and the email address.  The password can be left blank since aslong as you have full access and sendas permissions delegated to the user in Exchange.  Then just click next through the rest of the prompts and finally click finish.

snip_20160602102725

The only caveat to this is that automapping in Exchange adds as an additional mailbox so you might end up with duplicate entries of the same mailbox.  To fix this you will need to add the mailbox permissions through EMC (Exchange Management Console).  Microsoft has instructions on how to add the permissions without automapping in this Technet Article but the command for the EMC is also below.

Add-MailboxPermission -Identity JeroenC -User 'Mark Steele' -AccessRight FullAccess -InheritanceType All -Automapping $false

If you want to fix existing auto-mapping behavior for all the permissions on a particular mailbox the below commands will do the trick.

$FixAutoMapping = Get-MailboxPermission sharedmailbox |where {$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}
$FixAutoMapping | Remove-MailboxPermission
$FixAutoMapping | ForEach {Add-MailboxPermission -Identity $_.Identity -User $_.User -AccessRights:FullAccess -AutoMapping $false}

So there you have it, a simple fix for someone using a shared mailbox that needs to be able to send from the shared mailbox.
The articles I posted are from Exchange 2010 and Outlook 2010 but I have confirmed the functionality is the same in Outlook 2013 and Exchange 2013.