Git Product home page Git Product logo

Comments (7)

JAK1047 avatar JAK1047 commented on August 21, 2024 1

You can also install the older version of the module, zip it, then choose to add your own module in the Azure Automation Account instead of using the gallery and specifically use the 21.1.18256 version of SQLServer instead of 22 and above. Ran into the same issue with both RunBooks and normal scripts in the past when mixing in Az, PnP, or Graph modules and 21 never runs into the conflict for me.

from sqlserverpsmodule.

Matteo-T avatar Matteo-T commented on August 21, 2024

Hi @Tbablani72 ,

The issue is most likely a duplicate of another one which is going to require a complete rewrite of the module, sadly. But maybe there is hope that we can patch it up somehow...

Would you happen to know what thos "Automation Run Book" are setup and run? I have no clue... (well, I think I did something a while back, but I completely forgot).

It would be nice to know how the environement this script runs in is setup... i.e. what modules are loaded before the sqlSERVER cmdletes are executed...

Best option for me would be to have a repro that does not involve the Automation Run Book...

if that is not possible, could you at least have the script temporarily updated to dump the output of:

  1. $PSVersionTable
  2. Get-Module (before and after running the script fragment that is failing)
  3. Get all the loaded assemblies before and after running the script fragment that is failing)
    [System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object Location | Sort-Object -Property FullName | Select-Object -Property FullName, Location, GlobalAssemblyCache
  4. A description of the setup (I see there's an AVK, a DB, a managed identity, ...): how would I go about setting up an environment similar to that?

from sqlserverpsmodule.

Matteo-T avatar Matteo-T commented on August 21, 2024

This looks a lot like #45

@DBarmanMS - can you take a look at these issues and see if there's anything that we can suggest as workaround?

The ALC work is big and hardly coming any time soon... but perhaps we could play with our assembly resolution logic or maybe avoid this dependency in the AE cmdlet...

from sqlserverpsmodule.

DBarmanMS avatar DBarmanMS commented on August 21, 2024

Hi @Tbablani72 ,
Could you please share a stand-alone script to reproduce this issue? I'm not able to reproduce this in my setup following the cmdlet article.

from sqlserverpsmodule.

DBarmanMS avatar DBarmanMS commented on August 21, 2024

Easiest solution is to run the script in powershell 7. Please try it out and let me know if you face any issue.

from sqlserverpsmodule.

shashank-nayak-na avatar shashank-nayak-na commented on August 21, 2024

We were facing the same error when trying to run PowerShell script from our Jenkins pipeline. Only thing that worked was to change the SQLServer version to 21.1.18256. Seems using the latest version throws the error.

from sqlserverpsmodule.

vihanga-bandara avatar vihanga-bandara commented on August 21, 2024

This worked for us in our release pipeline when we toggled 'Use powershell core' in the release definition under Advanced.

from sqlserverpsmodule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.