Closed Xeno468 closed 1 month ago
hi @Xeno468 , I have various degrees of failures on azure automation myself. Can you try running a 5.1 host and see if it has the same kind of errors ? In 7.2, even the "official" module from MS doesn't work https://github.com/microsoft/SQLServerPSModule/issues/72
Can you pls tell me how to to test this? I got it to import but dont know how to do anything else. I only use azure automation to see if dbatools can load from the Modules panel.
import goes through always, if you try to run a "simple" connect-dbainstance it may reveal breaking, as using invoke-sqlcmd does for SQLServerPS .
Runbooks --> Create a runbook --> runbook type = powershell, version you may choose (7.2. if modules are imported for 7.2). Then you paste the code and you can either test it or run it after saving it
Thank you! Gonna try now.
hi @Xeno468 , I have various degrees of failures on azure automation myself. Can you try running a 5.1 host and see if it has the same kind of errors ? In 7.2, even the "official" module from MS doesn't work microsoft/SQLServerPSModule#72
The module is working in powershell 5.1. Other modules we use in our case ( if we want to stay up to date) work only in powershell 7.2. So that's why I need to change for powershell 7.2.
Azure Automation is such a sad implementation of PowerShell 7 support...7.2 which by November will be out of support 🐼 ....Azure team answer me WHY???!!! 😿 😭
Anyway, this specific message means the module is incompatible with 7.2 of PowerShell. The library imports fine, it is the module itself that will not import.
That error indicates something we are trying to do isn't compatibile in the build of PowerShell 7.2 Azure Automation is using.
This output shows you we require the lastest version of that assembly in PowerShell 7.2 to work but Azure Automation team is using a lower build.
How old/lower of a build you ask? They are on the RTM release of 7.2.0 😱 (shocker, not really).
The latest release of PS 7.2 is 7.2.19. They are on a release from....wait for it..7.2.0 - 2021-11-08!!!
Sorry but this is on Azure to fix. You can try submitting a support ticket and telling them they are running a version of PowerShell that the PowerShell Team is not supporting.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Steps to Reproduce
I attempted to reduce possible points of failure by creating this simple piece of code, but I still encountered the error.
Here's the code:
Additionally, I tried to manually import the module using this command: Import-Module dbatools. However, I received the following error:
thanks
Please confirm that you are running the most recent version of dbatools
Azure Automation Powershell 7.2 dbatools version 2.1.16 dbatools library 2024.4.12
Other details or mentions
No response
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe)
PowerShell Host Version
Name Value
PSVersion 7.2.0 PSEdition Core GitCommitId 7.2.0 OS Microsoft Windows 10.0.17763 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
SQL Server Edition and Build number
NA
.NET Framework Version
PSChildName Version
Client 4.7.03190
Full 4.7.03190
Client 4.0.0.0