Connect to Exchange online with EXO v2 PS module - Problem started this week

398 Views Asked by At

Hello ive seen a question here on Stack Overflow about problems to access Exchange online using EXO v2 PS module, if you have other Culture than en-US. The problem is first published here (as far as i can see):

Suddenly can't connect to Exchange Online via EXO v2 PS module

I cant answer in it because ive got low Reputation, started my account yesterday, before site maintenance. =)

I found a solution by changing the Culture to en-US and was then able to access Exchange online though PS with EXO v2 PS module, or rather with Exchangeonlinemanagement Module.

Here is a link to a github script to change Culture in PS.

https://github.com/PowerShell/PowerShell/issues/3831

Change: "[cultureinfo]::currentculture = 'fr-FR'" to prefered culture (in this case i choose en-US).

Follow notes described on github site, restart Powershell session and see with Get-Culture that its been changed to en-US.

Now you should be able to connect to Exchange Online from PS again.

Hope this helps my fellow swedish IT techs.

//David

2

There are 2 best solutions below

1
On

I experienced the same issue and tried the commands you listed and changing the regional settings in windows, but it only changed my culture for .NET.

I ended up running the below command, and that changed all the culture settings to en-US and now I'm able to log on.

Set-WinSystemLocale -SystemLocale 'en-US'
0
On

Same issue(s) here for me (problems with EXO V2 Module and not allowed to post answers in Suddenly can't connect to Exchange Online via EXO v2 PS module due to my newly created account)...we have found a another solution (besides changing locale from non-english (swedish in our case) to english) to the problem and that is to use certificate based authentication (https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps) which in our case worked without changing locale.

/A