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.

[AdSense-B]

The following steps are needed:

Install the .NET Framework 4.5:
http://msdn.microsoft.com/library/5a4x27ek(VS.110).aspx

Install the Windows Management Framework 3.0:
http://www.microsoft.com/en-us/download/details.aspx?id=34595

Set your user credentials

$UserCredential = Get-Credential

Set up the Session parameters:

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

Open the session:

[AdSense-A]

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