-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect-DbaInstance breaks Get-AzStorageBlob #9335
Comments
Seems like this could be conflicting versions of Azure Identity. Can you load dbatools after and see if it still works? If it continues not to work, I don't know how to fix it, unfortunately. Maybe try in Core as it loads DLLs differently (I think) |
This is by nature of the library version we use for Azure authentication being lower to the one used by Azure PowerShell modules...or version mismatch around APIs hit (could be both or one of the two). It will likely exists for the other modules that deal with identity auth and not just storage commands. Maybe you can expand on why you need to use those Az commands with dbatools in the same session? Also what does "crash" mean? |
I can reproduce the issue and the get the error message that is shown in the linked issue. Only importing dbatools is needed, no connection to an instance is needed. |
Workaround: Import Az modules first, then dbatools:
Just another example why I always import all modules at the top of the script in the "correct" order... |
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Very very weird interaction here.
If I call Connect-DbaInstance before using Get-AzStorageBlob, Get-AzStorageBlob will crash;
Azure/azure-powershell#24748
Steps to Reproduce
this does work
Please confirm that you are running the most recent version of dbatools
?
Other details or mentions
No response
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.20348.2227
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2227
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2022 (RTM-GDR) (KB5035432) - 16.0.1115.1 (X64) Mar 15 2024 01:13:46 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro N 10.0 (Build 22631: ) (Hypervisor)
.NET Framework Version
PSChildName Version
Client 4.8.04161
Full 4.8.04161
Client 4.0.0.0
The text was updated successfully, but these errors were encountered: