Office 365 Winmail.dat Fix

You're here because you're sending email to people with an attachment but they're receiving the attachment as a winmail.dat file. This is because Office 365 uses Exchange as the mail server and this is how it manages attachments and is used to preserve Rich Text formatting. Common receivers of your email with this issue are Apple iOS users.

So how do you prevent this from happening? Do the following:

Firstly, open Windows PowerShell. Make sure you run it as Administrator. Then run the following PowerShell commands:

  1. Set-ExecutionPolicy RemoteSigned
  2. $UserCredential = Get-Credential
  3. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  4. Import-PSSession $Session
  5. Set-RemoteDomain Default -TNEFEnabled $false
  6. Remove-PSSession $Session

That's all you need to do. This can take a 15 minutes or so to take effect, so be patient. At point 2 above, you need to supply your Office 365 administrators credentials when prompted.

No Comments Yet.

Leave a comment


Sign up to our newsletter where you’ll receive notices on when we post new articles and helpful “how tos” to make your IT life easier.