Friday, February 22, 2013

Resolve lotus winmail.dat issues with Office 365 and Outlook 2013 using powershell

A customer who uses Lotus would always receive a winmail.dat attachment when I sent them a file using Outlook 2013 and Office 365.  If I sent using the Office 365 webmail there was never an issue. 

In order to fix this problem I disabled TNEF encoding for all messages sent to all domains outside my organization in Office 365 using Powershell

From my research, I found the steps needed from four websites:


Here is a condensed version of the instructions:

Open Powershell as administrator and make sure you can excuted scripts
PS C:\Windows\system32> Get-ExecutionPolicy
PS C:\WINDOWS\system32> Set-Executionpolicy -ExecutionPolicy Unrestricted

Store your office 365 credentials (email@domain.com)
PS C:\WINDOWS\system32> $Cred = Get-Credential

Create the powershell connection to office 365 and disable TNEF
 PS C:\WINDOWS\system32> $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
PS C:\WINDOWS\system32> Import-PSSession $s
PS C:\WINDOWS\system32> Set-RemoteDomain Default -TNEFEnabled $false

Remove powershell connection
PS C:\WINDOWS\system32> Remove-PSSession $s
Close powershell