In my previous article: #MSDynGP Microsoft Dynamics GP and SMTP Email Failing, I mentioned that it was possible to check and/or change settings for your Exchange Online client.
There are a number of settings which can only be changed using PowerShell as they don’t have any user interface options available. However, many of the articles that provide the details on the settings never say how to actually get PowerShell working to use the settings.
This is where this article comes in …..
After some research I now have the steps to connect PowerShell to an Exchange Online instance so you can view and change settings not supported via the admin user interfaces.
Note: With the commands below, enter each command separately so you can see that it has completed successfully.
Connecting to Exchange Online
Start PowerShell using Run as Administrator, then run the commands below:
Set-ExecutionPolicy RemoteSigned -Force Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5 Connect-ExchangeOnline -UserPrincipalName <AdministratorEmailAddress>
Testing the Connection
Run the command below, if it lists the mailboxes on the Exchange Online Server, you have a working connection:
Get-Mailbox
Changing or Checking the SMTP Authentication setting
Set-TransportConfig -SmtpClientAuthenticationDisabled $false Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
Changing or Checking the Legacy TLS setting
Set-TransportConfig -AllowLegacyTLSClients $true Get-TransportConfig | Format-List AllowLegacyTLSClients
Allow Organization Customization
This option is needed if you want to change default spam filter settings.
Enable-OrganizationCustomization
Disconnecting from Exchange Online
Disconnect-ExchangeOnline Set-ExecutionPolicy Restricted -Force Exit
Note: With the commands above, enter each command separately so you can see that it has completed successfully.
Hope this helps save you the time it took me to gather all the commands together
David
This article was originally posted on http://www.winthropdc.com/blog.
Hello Sir,
I am well connected with Exchange Online. Get-mailbox is worked.
But when I run Set-TransportConfig command in powershell it gives me error
Set-TransportConfig : The term ‘Set-TransportConfig’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a p
ath was included, verify that the path is correct and try again
So Can you Please suggest where we run the command & How ?
Thanks for your Support !
LikeLike
Hi Tarun
I just tested all the commands as described in this article and they all worked as expected. Did you cut and paste the individual lines one by one?
David
LikeLike
Hello David,
yes I do same cut & Paste in my powershell but the powershell says ‘Set-TransportConfig’ is not recognized as the name of a cmdlet, function, script file, or operable program.
So All the command are running on powershell only or the Set-TransportConfig will run on different
place.
Thank You
Tarun yadav
LikeLike
Are you running each command one at a time? If it does not work for you, I am not sure why not.
LikeLike
I’ve done the suggested settings through powershell. Does it take a while for it to be effective? We are still on GP Dyanmics 2015 and will be upgraded soon. But I need the GP Dynamics to work in the meantime. So far no luck with emailing vendor remittances. It keep saying “Connection to MAPI server is not available.”
LikeLike
The changes take effect immediately. There must be something else going on.
LikeLike