ExchangeOnlineManagement v3 fails to connect in ISE

Matthew Hale 26 Reputation points
2022-10-26T15:29:46.917+00:00

I recently update the ExchangeOnlineManagement module to version 3.0.0 via Update-Module. Now it fails to connect, but only in the ISE environment for some reason.

PS C:\> Connect-ExchangeOnline  
  
You cannot call a method on a null-valued expression.  
At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.0.0\netFramework\ExchangeOnlineMa  
nagement.psm1:691 char:17  
+ ...             $cmdletLogger.LogGenericError($connectionContextID, $glob ...  
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException  
    + FullyQualifiedErrorId : InvokeMethodOnNull  

The error mentions the logger is failing, so I also tried different values for -LogLevel and -LogDirectoryPath, and I tried this on a few different machines (win10,server2012/16) without any luck.

I know VS Code is prioritized, but ISE is still supported and it's what I have available. It's not critical for me to update, but wanted to check that it's not just something in my environment

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,198 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.9K Reputation points MVP Volunteer Moderator
    2022-10-26T15:38:15.69+00:00

    Works fine here on a Win10 machine, no errors when connecting within the ISE. Try reinstalling the module?

    254346-image.png

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Matthew Hale 26 Reputation points
    2022-10-26T20:29:40.81+00:00

    Yep, that was the cause, and thanks for the reply! I figured it was something with my environments...

    I had version 2.0.4, 2.0.5, and 3.0.0 installed on the systems I tested

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.