-
Notifications
You must be signed in to change notification settings - Fork 189
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 PackageManagement module 1.4.8 #533
Comments
Please let me know if any other details may be needed for reproducing or troubleshooting. |
I'm having issues as well. Can't import PackageManagement or PowerShellGet modules. PowerShell 5.1.17763.2931.
I was able to revert to 1.4.7 and it resolved the issue for the server. |
@alerickson can you take a look? |
Question for both of you, @vvkjndl and @awickham10, is this only when you explicitly run |
Same issue persist in all prospective fresh sessions as long as 1.4.8 version of PackageManagement exists on system. |
@vvkjndl I found this issue online regarding the CouldNotAutoLoadMatchingModule error. Other info that would be helpful for debugging:
(If there's any private information here feel free to redact) |
@awickham10 can you run the following and share output:
|
I'm experiencing the same problem on many of our Windows Server 2016 servers that automatically updated to v1.4.8 of the PackageManagement module. And here's the output of running the commands you asked @awickham10 to run above @anamnavi |
Considering this is a pretty debilitating bug (e.g. can't install, update, or remove modules), it may be worth trying to unlist v1.4.8 from the Gallery, or mark it as a preview, to prevent others from updating to it until this is resolved. |
Thanks for unlisting PackageManagement v1.4.8 from the PowerShell Gallery so quickly team! 👍 Since PackageManagement v1.4.8 breaks the ability to use PowerShell to uninstall packages, I fixed up our servers by manually deleting the 1.4.8 module. You can check |
I'm debugging right now and can't figure out what exactly is going on... I verified the strong name signature using sn.exe and the files appear to be valid. @deadlydog can you run |
Our Execution Policy on that particular server is I did a quick search in all our PowerShell modules for |
My execution policy is Unrestricted. I have several PowerShell scripts in my infrastructure that automatically updates the module to latest version. Here's a workaround that I have applied on my servers:
|
Piling on that I had this same issue. Windows Server 2016. Tried even a brand new Windows install and manually installing the packages. Same exact errors messages and lack of Exported Commands either with explicit or implicit imports. |
@alerickson Information you asked for:
|
Okay, the issue with 1.4.8 was due to the strong name signing process in our pipeline. For some reason the strong name signature was showing as valid on Microsoft machines (probably a cert that's by default on our machines), but not on other machines. There's a fix for this and https://www.powershellgallery.com/packages/PackageManagement/1.4.8.1 should have a valid strong name signature for everyone now 😄 Note: version 1.4.8.1 is unlisted right now, but still accessible if you find/install that exact version. I'll list again after the weekend. |
Thanks for getting this resolved so quickly @alerickson! I provisioned several new servers yesterday, which pull the latest PackageManagement, and did not have any problems. |
The text was updated successfully, but these errors were encountered: