Winmail.dat attachments from Outlook on Office 365

So, I setup a new e-mail account on Office 365.  For two reasons:
1. I like using Outlook and a hosted Exchange instance lets me leverage way more Outlook features than something like Google Apps.
2. I am leaving my current job and will be losing my Word, Excel, etc. software when I do.

It seemed like the best of both worlds, however; after I setup my account in Outlook, all of my test e-mails had a winmail.dat attachment on them.

I came to learn that this is because Office 365 uses a TNEF format that works great on Exchange and Outlook, but other e-mail servers and clients can get confused by them.

Some research in Microsoft documentation told me how to change that setting for one domain or one e-mail, as long as that e-mail was in my contacts, but not how to globally change it.  Luckily I found the answer.  Use Windows Powershell to login to your Office 365 instance.

First, run Windows Powershell as an Administrator.  This is needed to change an Execution policy.  Then type in:

Set-ExecutionPolicy RemoteSigned

Once that is done, you can setup your session using these commands.

$UserCredential = Get-Credential

This will open a dialog box where you can type in your office 365 username and password. (myusername@mycompany.onmicrosoft.com)

Then:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Finally:
Import-PSSession $Session

Now you’re connected. To set the policy for all external e-mails to not use the TNEF format, run this command.
Set-RemoteDomain Default -TNEFEnabled $false

Then just to clean things up, run this command
Remove-PSSession $Session

This simple set of rules did the trick for me.

 

Leave a Reply

Your email address will not be published. Required fields are marked *