One of the recurring problems with Office365 or Hosted Exchange is the winmail.dat issue. People using a different mail server get wrong attachements. This is because of the Rich Text format used within the Exchange Server.

In this How To we will turn off this feature for Office365. Similar to this U can fix your Exchange server or your hosted Exchange.


The following steps are needed:

Install the .NET Framework 4.5:

Install the Windows Management Framework 3.0:

Set your user credentials

$UserCredential = Get-Credential

Set up the Session parameters:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Open the session:


Import-PSSession $Session

Remove the TNEF setting from all outgoing mail:

Set-RemoteDomain Default -TNEFEnabled $false

Check if it worked:

Get-RemoteDomain |fl

Close session:

Remove-PSSession $Session