Assembly loading with Powershell component

Hi,

I am running V9 CU3 LTS and have a question about loading assembly versions different than the OOTB provided dll's. I have a PowerShell script that is using the Microsoft Graph/Signins modules and it fails because the old OOTB Microsoft.Graph.dll is loaded instead of the assemblies provided by the PowerShell modules. How to force a fallback or disable the default loading of OOTB versions of 3rd party assemblies?

Rodney

Parents
  • Did you try one of the proposed workarounds from the release notes?

    Possible workarounds:

    Check whether the following workarounds might work with respect to input parameter and return value.

    • Call PowerShell as a subprocess
      • To run a PowerShell command out of the current process, start a new PowerShell process directly with the command call:

        pwsh -c 'Invoke-ConflictingCommand'

    • Use the CommandComponent process component with the Execute process task to launch the PowerShell application with the following command call.

      powershell -c 'Invoke-ConflictingCommand
  • Thanks Markus, that is what I normally use but in this case I wanted to do the process isolation using a dedicated job service without the offending Microsoft.Graph*.dll's. The Graph dll's are coming with the Azure AD machine role and I disabled that (Note: The update of the job server dll's has a bug and did not remove the dll's). I do not know how the PowerShell runspaces are created for the PowerShellComponent4 but even without the Graph dll's in the job service folder I was getting conflicts. Having a separate job service on a server with multiple services does not bring complete process isolation.

Reply
  • Thanks Markus, that is what I normally use but in this case I wanted to do the process isolation using a dedicated job service without the offending Microsoft.Graph*.dll's. The Graph dll's are coming with the Azure AD machine role and I disabled that (Note: The update of the job server dll's has a bug and did not remove the dll's). I do not know how the PowerShell runspaces are created for the PowerShellComponent4 but even without the Graph dll's in the job service folder I was getting conflicts. Having a separate job service on a server with multiple services does not bring complete process isolation.

Children
No Data