Stop WINMAIL.DAT TNEF attachments being sent in Office365

Powershell

$Cred = Get-Credential

Connect-msolservice -credential $Cred

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

Import-PSSession $Session

Set-RemoteDomain Default -TNEFEnabled $false

Remove-PSSession $Session

Source: Spiceworks