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

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,517 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,521 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 105.7K Reputation points MVP
    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.