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
Unable to import ActiveDirectory module in PowerShell daily20230225.2 build #19238
Comments
|
The |
Can you explain why I was able to import the module in previous daily builds before daily20230225.2? I was using the ActiveDirectory module in daily20230217.2 just last week. |
|
Are you able to import the module in v7.2.10, v7.3.3, and the v7.4.0-preview.1 of PowerShell? |
I guess because we moved to .Net 8 from .Net 7. |
@SteveL-MSFT I don't have v7.2.10 installed but |
|
Removed the "Resolution" label. We need to keep this issue open and verify if this is caused by moving to .NET 8. /cc @adityapatwardhan @TravisEz13 @SeeminglyScience |
|
@daxian-dbw I guess we will have to check all standard Windows modules. |
|
So I've just taken a stab at investigating this and here is what I've found. The error occurs in I'm not sure why it's using the GAC Here is a trace of the assembly resolution when pwsh goes to load the AD cmdlets (top is 7.4 and bottom is 7.3). I'm not sure what else to investigate but there is something going on with how assemblies are being loaded here. |
|
@jborean93 Thank you so much for the investigation! The package
So, this regression is caused by the changes in the latest Looping in @SeeminglyScience and @SteveL-MSFT to share their thoughts. |
Even if it isn't deemed to be a real regression I would very much argue that pwsh should solve this problem before 7.4 is actually released due to its popularity on Windows. Going back to the pre Server 2019 days where it used the implicit remoting module is going to break a lot of people's scripts. |
|
I agree. Leaving it as is will break a lot of scripts. For this particular issue, I guess we will have to lock the versions of the I think we should plan ahead. One option is that we lock the version of those packages in 7.4 to keep |

Prerequisites
Steps to reproduce
After installing the latest PowerShell Daily build (daily20230225.2) I am unable to import the
ActiveDirectorymoduleImport-Module ActiveDirectoryExpected behavior
Module should import with no error.Actual behavior
Import-Module: Attempting to perform the InitializeDefaultDrives operation on the 'ActiveDirectory' provider failed.Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: