Skip to content

Microsoft.Graph.Authentication no compatible with ExchangeOnlineManagement #2803

Closed

Description

Describe the bug

I am working in a script on PowerShell 5.1 with ExchangeOnlineManagement and Microsoft.Graph.Authentication and if I try to connect to Graph after connect to Exchange Online I received an error message:
image

In the troubleshooting I found that the issue appear as well just importing the modules in the same order:
image

In case that I run in verbose mode
Import-Module ExchangeOnlineManagement -Verbose
Import-Module Microsoft.Graph.Authentication -Verbose
image

If I look for the error:
image

It looks it is trying to look for Azure.Core on ExchangeOnlineManagement module.

if I change the order all works fine:
image

image

Expected behavior

Be able to work with both modules, without errors and could use any order in the request.

How to reproduce

Connect-ExchangeOnline -ShowBanner:$false
Connect-MgGraph -NoWelcome

Import-Module ExchangeOnlineManagement
Import-Module Microsoft.Graph.Authentication

Import-Module ExchangeOnlineManagement -Verbose
Import-Module Microsoft.Graph.Authentication -Verbose

SDK Version

2.19.0

Latest version known to work for scenario above?

No response

Known Workarounds

It works with PowerShell 7 or with ExchangeOnlineManagement 3.4.0

Debug output

Click to expand log ```

VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted versions.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Users\xxxxx\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.19.0\Microsoft.Graph.Authentication.format.ps1xml'.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Authentication.
VERBOSE: Loading module from path 'C:\Users\xxxxx\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.19.0\Microsoft.Graph.Authentication.dll'.
VERBOSE: Importing cmdlet 'Get-ModuleCmdlet'.
VERBOSE: Importing cmdlet 'Get-ScriptCmdlet'.
VERBOSE: Importing cmdlet 'Connect-MgGraph'.
VERBOSE: Importing cmdlet 'Disconnect-MgGraph'.
VERBOSE: Importing cmdlet 'Add-MgEnvironment'.
VERBOSE: Importing cmdlet 'Get-MgEnvironment'.
VERBOSE: Importing cmdlet 'Remove-MgEnvironment'.
VERBOSE: Importing cmdlet 'Set-MgEnvironment'.
VERBOSE: Importing cmdlet 'Get-MgContext'.
VERBOSE: Importing cmdlet 'Get-MgGraphOption'.
VERBOSE: Importing cmdlet 'Invoke-MgGraphRequest'.
VERBOSE: Importing cmdlet 'Set-MgGraphOption'.
VERBOSE: Importing cmdlet 'Get-MgRequestContext'.
VERBOSE: Importing cmdlet 'Set-MgRequestContext'.
VERBOSE: Importing alias 'Connect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Disconnect-Graph'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Importing alias 'Invoke-GraphRequest'.
VERBOSE: Importing alias 'Invoke-MgRestMethod'.
VERBOSE: Loading module from path 'C:\Users\xxxxx\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.19.0\Microsoft.Graph.Authentication.Core.dll'.
Import-Module : Could not load file or assembly 'file:///C:\Users\xxxxx\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.0\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1

  • Import-Module Microsoft.Graph.Authentication -Debug
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    
</details>


### Configuration

Name                           Value
----                           -----
PSVersion                      5.1.22621.3672
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.3672
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Windows 10, 11, Server 2022 x64

### Other information

_No response_

Activity

  1. McDoMaster commented on Jun 21, 2024

    @McDoMaster

    Got the same issue on the version 3.5.0 of Exchange Online Management. The workaround remains the same.

  2. Eulafe commented on Jul 2, 2024

    @Eulafe

    Got the same issue on Azure Automation with Microsoft.Graph.* v2.19.0 + ExchangeOnlineManagement v3.5.0

    Workaround works with Microsoft.Graph.* v2.19.0 + ExchangeOnlineManagement v3.4.0

    Thanks for this!

  3. timayabi2020 commented on Jul 29, 2024

    @timayabi2020
    Contributor

    Hi Ignacio Serrano (@iserrano76) please update to the latest Microsoft.Graph PowerShell SDK version (2.21.0) which has the latest Azure.Core version (1.39.0) compatible with ExchangeOnlineManagement version 3.5.1.
    image

  4. secretworkpersona commented on Jul 30, 2024

    @secretworkpersona

    Latest version (2.21.0) does not resolve the issue for me.

    ModuleError

  5. iserrano76 commented on Jul 30, 2024

    @iserrano76
    Author

    Hi Ignacio Serrano (@iserrano76) please update to the latest Microsoft.Graph PowerShell SDK version (2.21.0) which has the latest Azure.Core version (1.39.0) compatible with ExchangeOnlineManagement version 3.5.1. image

    Hi Tim (@timayabi2020),

    It looks the same issue:
    image

    image

  6. timayabi2020 commented on Jul 30, 2024

    @timayabi2020
    Contributor

    Ignacio Serrano (@iserrano76) apologies I just realized that I was in a PowerShell 7 session and not 5.1 and I was able to reproduce the issue. After investigations, it seems that ExchangeOnlineManagment module from version 3.5.0 onwards is not isolating its dependencies into an Assembly Loading Context as described here https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts?view=powershell-7.4. Besides the work around of rolling back to version 3.4.0, you might want to consider running the modules in their individual PowerShell sessions.

  7. 13 remaining items

  8. timayabi2020 commented on Sep 6, 2024

    @timayabi2020
    Contributor

    For those who are still experiencing this issue, try and use the latest preview version of exchange online.
    Use this command to install Install-Module -Name ExchangeOnlineManagement -AllowPrerelease -Force

    image
  9. added and removed
    status:waiting-for-dependencyAn issue that has core project dependency that's currently blocking it
    on Sep 6, 2024
  10. ks-git-22 commented on Sep 9, 2024

    @ks-git-22

    Tim (@timayabi2020)
    Thank you for the delightful news.

    I had tried ExchangeOnlineManagement 3.6.0.Preview1.
    The issue was resolved.

    I executed the commands in the order of Connect-MgGraph, Connect-ExchangeOnline, and also in the order of Connect-ExchangeOnline, Connect-MgGraph, and both were successful.

    Therefore, I am looking forward to the release of the next official version.

  11. spplante commented on Sep 9, 2024

    @spplante

    Tim (@timayabi2020) I have the same issue with 3.6.0 with the PnP.PowerShell module. If I import import the PnP module before or after importing the exchange module, the Connect-ExchangeOnline or Connect-IPPSSession both fail with the same error.

    Downgrading to 3.4.0 does fix the issue in my case, but not upgrading to 3.6.0.

  12. iserrano76 commented on Sep 10, 2024

    @iserrano76
    Author

    The issue is in Powershell 5.1 and Import-module do not offer me AllowPrerelease parameter

    image

    How do you install 3.6 Preview in powershell 5.1?

  13. spplante commented on Sep 10, 2024

    @spplante

    Ignacio Serrano (@iserrano76) You need to update PowershellGet in order to have the switch available. I have the exacte same version of PowerShell as you and I do have the "AllowPrerelease" switch

  14. spplante commented on Sep 10, 2024

    @spplante

    ExchangeOnlineManagement

    I upgraded to PowerShell 7 and used PnP.PowerShell 2.12.0 instead of 1.12.0 and it works fine now with ExchangeOnlineManagement 3.6.0.

  15. iserrano76 commented on Sep 10, 2024

    @iserrano76
    Author

    I test it with PS5.1 and EXO management 3.6.0-Preview1 and looks fine, I can connect both sessions.
    Great, Thanks!!
    I will wait for final version :)

  16. syne0 commented on Sep 12, 2024

    @syne0

    Confirmed it fixed my issue with importing module that had both exo and graph module dependencies. Thanks!

  17. iyerusad commented on Nov 21, 2024

    @iyerusad

    Similarly see issues with attempting to run ExchangeOnlineManagement module within Azure Functions.

    I am able to successfully Import-Module ExchangeOnlineManagement @ 3.0.0

    Running most higher versions doesn't appear to work (e.g. 3.6.0, 3.7.0-preview1, 3.5.0, etc).

    • Added some debug and couldn't make much progress on it -- the errors suggesting missing file Import-Module $RestModulePath didn't make much since adding Test-Path $RestModulePath seems to confirm the file it is looking for exists.

    At the moment downgraded to EXO 3.0.0, hoping a fix comes forth.

    Output from EXO @ 3.6.0 (as defined in requirements.psd1):

    [2024-11-21T09:00:55.205Z] INFORMATION: Importing Module: ExchangeOnlineManagement
    [2024-11-21T09:00:56.972Z] ERROR: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:56.972Z] 
    [2024-11-21T09:00:56.973Z] Exception             : 
    [2024-11-21T09:00:56.973Z]     Type       : System.IO.FileNotFoundException
    [2024-11-21T09:00:56.973Z]     Message    : Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:56.974Z]     FileName   : System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    [2024-11-21T09:00:56.974Z]     TargetSite :
    [2024-11-21T09:00:56.975Z]         Name          : GetExportedTypes
    [2024-11-21T09:00:56.975Z]         DeclaringType : System.Reflection.RuntimeAssembly, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    [2024-11-21T09:00:56.976Z]         MemberType    : Method
    [2024-11-21T09:00:56.976Z]         Module        : System.Private.CoreLib.dll
    [2024-11-21T09:00:56.976Z]     StackTrace :
    [2024-11-21T09:00:56.977Z]    at System.Reflection.RuntimeAssembly.GetExportedTypes()
    [2024-11-21T09:00:56.977Z]    at System.Reflection.Assembly.get_ExportedTypes()
    [2024-11-21T09:00:56.978Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(Assembly assembly, String name)
    [2024-11-21T09:00:56.978Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, String helpFile, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers)
    [2024-11-21T09:00:56.979Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
    [2024-11-21T09:00:56.979Z]    at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
    [2024-11-21T09:00:56.980Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
    [2024-11-21T09:00:56.980Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
    [2024-11-21T09:00:56.980Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
    [2024-11-21T09:00:56.981Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
    [2024-11-21T09:00:56.981Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:56.982Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:56.982Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
    [2024-11-21T09:00:56.983Z]    at System.Management.Automation.Cmdlet.DoProcessRecord()
    [2024-11-21T09:00:56.983Z]    at System.Management.Automation.CommandProcessor.ProcessRecord()
    [2024-11-21T09:00:56.983Z]     Source     : System.Private.CoreLib
    [2024-11-21T09:00:56.984Z]     HResult    : -2147024894
    [2024-11-21T09:00:56.984Z] CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
    [2024-11-21T09:00:56.985Z] FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    [2024-11-21T09:00:56.985Z] InvocationInfo        :
    [2024-11-21T09:00:56.985Z]     MyCommand        : Import-Module
    [2024-11-21T09:00:56.986Z]     ScriptLineNumber : 4
    [2024-11-21T09:00:56.986Z]     OffsetInLine     : 1
    [2024-11-21T09:00:56.986Z]     HistoryId        : 1
    [2024-11-21T09:00:56.987Z]     ScriptName       : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:56.987Z]     Line             : Import-Module $RestModulePath
    [2024-11-21T09:00:56.988Z]
    [2024-11-21T09:00:56.988Z]     PositionMessage  : At C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1:4 char:1
    [2024-11-21T09:00:56.989Z]                        + Import-Module $RestModulePath
    [2024-11-21T09:00:56.989Z]                        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2024-11-21T09:00:56.989Z]     PSScriptRoot     : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore
    [2024-11-21T09:00:56.990Z]     PSCommandPath    : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:56.990Z]     InvocationName   : Import-Module
    [2024-11-21T09:00:56.991Z]     CommandOrigin    : Internal
    [2024-11-21T09:00:56.991Z] ScriptStackTrace      : at <ScriptBlock>, C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1: line 4
    [2024-11-21T09:00:56.992Z]                         at <ScriptBlock>, C:\Users\User\Desktop\git\test-azfuncs-powershell\msExch-test\run.ps1: line 78
    [2024-11-21T09:00:56.992Z]
    [2024-11-21T09:00:56.992Z]
    [2024-11-21T09:00:56.993Z] Result: ERROR: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:56.993Z]
    [2024-11-21T09:00:56.993Z] Exception             :
    [2024-11-21T09:00:56.994Z]     Type       : System.IO.FileNotFoundException
    [2024-11-21T09:00:56.994Z]     Message    : Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:56.995Z]     FileName   : System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    [2024-11-21T09:00:56.995Z]     TargetSite :
    [2024-11-21T09:00:56.995Z]         Name          : GetExportedTypes
    [2024-11-21T09:00:56.996Z]         DeclaringType : System.Reflection.RuntimeAssembly, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    [2024-11-21T09:00:56.996Z]         MemberType    : Method
    [2024-11-21T09:00:56.997Z]         Module        : System.Private.CoreLib.dll
    [2024-11-21T09:00:56.997Z]     StackTrace :
    [2024-11-21T09:00:56.997Z]    at System.Reflection.RuntimeAssembly.GetExportedTypes()
    [2024-11-21T09:00:56.998Z]    at System.Reflection.Assembly.get_ExportedTypes()
    [2024-11-21T09:00:56.998Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(Assembly assembly, String name)
    [2024-11-21T09:00:56.999Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, String helpFile, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers)
    [2024-11-21T09:00:56.999Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
    [2024-11-21T09:00:57.000Z]    at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
    [2024-11-21T09:00:57.000Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
    [2024-11-21T09:00:57.000Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
    [2024-11-21T09:00:57.001Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
    [2024-11-21T09:00:57.001Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
    [2024-11-21T09:00:57.002Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.002Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.003Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
    [2024-11-21T09:00:57.003Z]    at System.Management.Automation.Cmdlet.DoProcessRecord()
    [2024-11-21T09:00:57.003Z]    at System.Management.Automation.CommandProcessor.ProcessRecord()
    [2024-11-21T09:00:57.004Z]     Source     : System.Private.CoreLib
    [2024-11-21T09:00:57.004Z]     HResult    : -2147024894
    [2024-11-21T09:00:57.005Z] CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
    [2024-11-21T09:00:57.005Z] FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    [2024-11-21T09:00:57.006Z] InvocationInfo        :
    [2024-11-21T09:00:57.006Z]     MyCommand        : Import-Module
    [2024-11-21T09:00:57.007Z]     ScriptLineNumber : 4
    [2024-11-21T09:00:57.008Z]     OffsetInLine     : 1
    [2024-11-21T09:00:57.008Z]     HistoryId        : 1
    [2024-11-21T09:00:57.009Z]     ScriptName       : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:57.009Z]     Line             : Import-Module $RestModulePath
    [2024-11-21T09:00:57.010Z]
    [2024-11-21T09:00:57.010Z]     PositionMessage  : At C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1:4 char:1
    [2024-11-21T09:00:57.011Z]                        + Import-Module $RestModulePath
    [2024-11-21T09:00:57.011Z]                        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2024-11-21T09:00:57.011Z]     PSScriptRoot     : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore
    [2024-11-21T09:00:57.012Z]     PSCommandPath    : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:57.012Z]     InvocationName   : Import-Module
    [2024-11-21T09:00:57.013Z]     CommandOrigin    : Internal
    [2024-11-21T09:00:57.014Z] ScriptStackTrace      : at <ScriptBlock>, C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1: line 4
    [2024-11-21T09:00:57.015Z]                         at <ScriptBlock>, C:\Users\User\Desktop\git\test-azfuncs-powershell\msExch-test\run.ps1: line 78
    [2024-11-21T09:00:57.016Z]
    [2024-11-21T09:00:57.016Z]
    Exception: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    Stack:    at System.Reflection.RuntimeAssembly.GetExportedTypes()
    [2024-11-21T09:00:57.017Z]    at System.Reflection.Assembly.get_ExportedTypes()
    [2024-11-21T09:00:57.017Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(Assembly assembly, String name)
    [2024-11-21T09:00:57.018Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, String helpFile, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers)
    [2024-11-21T09:00:57.018Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
    [2024-11-21T09:00:57.019Z]    at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
    [2024-11-21T09:00:57.020Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
    [2024-11-21T09:00:57.020Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
    [2024-11-21T09:00:57.021Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
    [2024-11-21T09:00:57.021Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
    [2024-11-21T09:00:57.022Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.022Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.023Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
    [2024-11-21T09:00:57.023Z]    at System.Management.Automation.Cmdlet.DoProcessRecord()
    [2024-11-21T09:00:57.024Z]    at System.Management.Automation.CommandProcessor.ProcessRecord().
    [2024-11-21T09:00:57.028Z] ERROR: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.   
    [2024-11-21T09:00:57.028Z]
    [2024-11-21T09:00:57.029Z] Exception             :
    [2024-11-21T09:00:57.029Z]     Type       : System.IO.FileNotFoundException
    [2024-11-21T09:00:57.030Z]     Message    : Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:57.030Z]     FileName   : System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    [2024-11-21T09:00:57.031Z]     TargetSite :
    [2024-11-21T09:00:57.031Z]         Name          : GetExportedTypes
    [2024-11-21T09:00:57.032Z]         DeclaringType : System.Reflection.RuntimeAssembly, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    [2024-11-21T09:00:57.032Z]         MemberType    : Method
    [2024-11-21T09:00:57.033Z]         Module        : System.Private.CoreLib.dll
    [2024-11-21T09:00:57.033Z]     StackTrace :
    [2024-11-21T09:00:57.034Z]    at System.Reflection.RuntimeAssembly.GetExportedTypes()
    [2024-11-21T09:00:57.034Z]    at System.Reflection.Assembly.get_ExportedTypes()
    [2024-11-21T09:00:57.035Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(Assembly assembly, String name)
    [2024-11-21T09:00:57.035Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, String helpFile, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers)
    [2024-11-21T09:00:57.036Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
    [2024-11-21T09:00:57.036Z]    at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
    [2024-11-21T09:00:57.037Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
    [2024-11-21T09:00:57.037Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
    [2024-11-21T09:00:57.038Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
    [2024-11-21T09:00:57.038Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
    [2024-11-21T09:00:57.039Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.039Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.040Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
    [2024-11-21T09:00:57.040Z]    at System.Management.Automation.Cmdlet.DoProcessRecord()
    [2024-11-21T09:00:57.041Z]    at System.Management.Automation.CommandProcessor.ProcessRecord()
    [2024-11-21T09:00:57.041Z]     Source     : System.Private.CoreLib
    [2024-11-21T09:00:57.042Z]     HResult    : -2147024894
    [2024-11-21T09:00:57.042Z] CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
    [2024-11-21T09:00:57.043Z] FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    [2024-11-21T09:00:57.043Z] InvocationInfo        :
    [2024-11-21T09:00:57.044Z]     MyCommand        : Import-Module
    [2024-11-21T09:00:57.044Z]     ScriptLineNumber : 8
    [2024-11-21T09:00:57.045Z]     OffsetInLine     : 1
    [2024-11-21T09:00:57.045Z]     HistoryId        : 1
    [2024-11-21T09:00:57.046Z]     ScriptName       : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:57.046Z]     Line             : Import-Module $ExoPowershellModulePath
    [2024-11-21T09:00:57.047Z]
    [2024-11-21T09:00:57.047Z]     PositionMessage  : At C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1:8 char:1
    [2024-11-21T09:00:57.048Z]                        + Import-Module $ExoPowershellModulePath
    [2024-11-21T09:00:57.048Z]                        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2024-11-21T09:00:57.048Z]     PSScriptRoot     : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore
    [2024-11-21T09:00:57.049Z]     PSCommandPath    : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:57.049Z]     InvocationName   : Import-Module
    [2024-11-21T09:00:57.050Z]     CommandOrigin    : Internal
    [2024-11-21T09:00:57.050Z] ScriptStackTrace      : at <ScriptBlock>, C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1: line 8
    [2024-11-21T09:00:57.051Z]                         at <ScriptBlock>, C:\Users\User\Desktop\git\test-azfuncs-powershell\msExch-test\run.ps1: line 78
    [2024-11-21T09:00:57.051Z]
    [2024-11-21T09:00:57.051Z]
    [2024-11-21T09:00:57.052Z] Result: ERROR: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:57.052Z]
    [2024-11-21T09:00:57.052Z] Exception             :
    [2024-11-21T09:00:57.053Z]     Type       : System.IO.FileNotFoundException
    [2024-11-21T09:00:57.053Z]     Message    : Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    [2024-11-21T09:00:57.054Z]     FileName   : System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    [2024-11-21T09:00:57.054Z]     TargetSite :
    [2024-11-21T09:00:57.055Z]         Name          : GetExportedTypes
    [2024-11-21T09:00:57.055Z]         DeclaringType : System.Reflection.RuntimeAssembly, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    [2024-11-21T09:00:57.055Z]         MemberType    : Method
    [2024-11-21T09:00:57.056Z]         Module        : System.Private.CoreLib.dll
    [2024-11-21T09:00:57.056Z]     StackTrace :
    [2024-11-21T09:00:57.056Z]    at System.Reflection.RuntimeAssembly.GetExportedTypes()
    [2024-11-21T09:00:57.057Z]    at System.Reflection.Assembly.get_ExportedTypes()
    [2024-11-21T09:00:57.057Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(Assembly assembly, String name)
    [2024-11-21T09:00:57.058Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, String helpFile, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers)
    [2024-11-21T09:00:57.058Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
    [2024-11-21T09:00:57.059Z]    at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
    [2024-11-21T09:00:57.059Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
    [2024-11-21T09:00:57.059Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
    [2024-11-21T09:00:57.060Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
    [2024-11-21T09:00:57.060Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
    [2024-11-21T09:00:57.061Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.061Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.062Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
    [2024-11-21T09:00:57.062Z]    at System.Management.Automation.Cmdlet.DoProcessRecord()
    [2024-11-21T09:00:57.063Z]    at System.Management.Automation.CommandProcessor.ProcessRecord()
    [2024-11-21T09:00:57.063Z]     Source     : System.Private.CoreLib
    [2024-11-21T09:00:57.064Z]     HResult    : -2147024894
    [2024-11-21T09:00:57.064Z] CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
    [2024-11-21T09:00:57.064Z] FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    [2024-11-21T09:00:57.065Z] InvocationInfo        :
    [2024-11-21T09:00:57.065Z]     MyCommand        : Import-Module
    [2024-11-21T09:00:57.066Z]     ScriptLineNumber : 8
    [2024-11-21T09:00:57.066Z]     OffsetInLine     : 1
    [2024-11-21T09:00:57.067Z]     HistoryId        : 1
    [2024-11-21T09:00:57.067Z]     ScriptName       : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:57.067Z]     Line             : Import-Module $ExoPowershellModulePath
    [2024-11-21T09:00:57.068Z]
    [2024-11-21T09:00:57.068Z]     PositionMessage  : At C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1:8 char:1
    [2024-11-21T09:00:57.069Z]                        + Import-Module $ExoPowershellModulePath
    [2024-11-21T09:00:57.069Z]                        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2024-11-21T09:00:57.070Z]     PSScriptRoot     : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore
    [2024-11-21T09:00:57.070Z]     PSCommandPath    : C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1
    [2024-11-21T09:00:57.071Z]     InvocationName   : Import-Module
    [2024-11-21T09:00:57.071Z]     CommandOrigin    : Internal
    [2024-11-21T09:00:57.072Z] ScriptStackTrace      : at <ScriptBlock>, C:\Users\User\AppData\Local\AzureFunctions\test-azfuncs-powershell\ManagedDependencies\2411210859358475217.r\ExchangeOnlineManagement\3.6.0\netCore\ExchangeOnlineManagement.psm1: line 8
    [2024-11-21T09:00:57.072Z]                         at <ScriptBlock>, C:\Users\User\Desktop\git\test-azfuncs-powershell\msExch-test\run.ps1: line 78
    [2024-11-21T09:00:57.073Z]
    [2024-11-21T09:00:57.073Z]
    Exception: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    Stack:    at System.Reflection.RuntimeAssembly.GetExportedTypes()
    [2024-11-21T09:00:57.073Z]    at System.Reflection.Assembly.get_ExportedTypes()
    [2024-11-21T09:00:57.074Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(Assembly assembly, String name)
    [2024-11-21T09:00:57.074Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, String helpFile, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers)
    [2024-11-21T09:00:57.075Z]    at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
    [2024-11-21T09:00:57.075Z]    at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
    [2024-11-21T09:00:57.076Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
    [2024-11-21T09:00:57.076Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
    [2024-11-21T09:00:57.077Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
    [2024-11-21T09:00:57.077Z]    at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found)
    [2024-11-21T09:00:57.078Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.078Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions importModuleOptions, String name)
    [2024-11-21T09:00:57.078Z]    at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
    [2024-11-21T09:00:57.079Z]    at System.Management.Automation.Cmdlet.DoProcessRecord()
    [2024-11-21T09:00:57.079Z]    at System.Management.Automation.CommandProcessor.ProcessRecord().
    [2024-11-21T09:00:57.080Z] INFORMATION: ExchangeOnlineManagement Version: @{Version=3.6.0}
    
  18. ITJoeSchmo commented on Dec 18, 2024

    @ITJoeSchmo

    I thought it was worth hopping on here, I believe this is basically just another instance of Microsoft bundling conflicting versions of the NewtonSoft.Json assembly between modules which end up being loaded together, which ultimately is the same as this issue: Azure/azure-powershell#21960

    There have been assembly conflicts now between Az PowerShell submodules <> ExchangeOnline <> Graph submodules <> AzureAutomation HybridWorker modules. One solution is to move to PS Core, which can handle assembly conflicts between modules imported.

    For PS5.1 I posted the below work-around and script to implement it in that same thread here: Azure/azure-powershell#21960 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions