Changing Exchange Online Settings with PowerShell

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
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.
This was originally posted here.

Like
Report
*This post is locked for comments