This topic contains 5 replies, has 3 voices, and was last updated by
November 1, 2018 at 7:12 pm #120904
I'm attempting to use the built-in package management functions in powershell version 5, however I'm running into an interesting issue, using the "get-package pagkagename" process, I'm getting the following prompt:
The provider 'nuget v18.104.22.168' is not installed.
nuget may be manually downloaded from https://oneget.org/Microsoft.PackagaeManagement.NuGetProvider-22.214.171.124.dll and installed.
Would you like PackageManagement to automatically download and install 'nuget' now?
Why is this? What am I missing? I'm trying to look at an *.msi package that was installer or see if it's installed? Is this possible to do without the 'nuget' package?
November 1, 2018 at 7:23 pm #120910ParticipantPoints: 1,607Rank: Community Hero
PowerShell package management(PowerShellGet) uses nuget, hence it has to be installed if you want to use PowerShellGet
November 1, 2018 at 7:29 pm #120912
After digging into this a little further, I found that this is indeed not the case,
"Get–Package –Provider Programs –IncludeWindowsInstaller -Name PackageName" works great!
Thank you for the input though. I'm using this in an internal/secure environment, where we want to keep the outside sources to a minimum.
November 1, 2018 at 7:35 pm #120918ParticipantPoints: 1,607Rank: Community Hero
Yup, What I mentioned is about 'PoweerShellGet' package provider. Here you use 'Programs' provider to get installed MSI package. There are more package providers, you can get it using 'Get-PackageProvider' cmdlet.
November 1, 2018 at 8:04 pm #120928
Agreed. As I stated in my initial question, I was attempting to look at locally installed packages, via *.msi packages. I didn't look deep enough into selecting a single local package "Programs" provider.
November 3, 2018 at 3:16 am #121483ParticipantPoints: 1,113Rank: Community Hero
Yep, just using..
… all by itself would show that as well.
Just curious, what OS are you running and what version of PS?
The reason I ask, is because, by design on pre-Win10 and pre-PS5x, you had to download and install the Windows PowerShell Package Manager https://blogs.msdn.microsoft.com/powershell/2016/03/08/package-management-preview-march-2016-for-powershell-4-3-is-now-available ( for PSv4 – which included the *package, *module, etc. were included) and it would automatically install nuget as per the MS docs, which kvprasoon addressing.
MS on Win10 and PS5, PSGet is already there and so, you would not have been prompted for that nuget thingy. There are some packages in nuget repo that are not available in PSGet, so, there is a reason to have it if there are packages you find online, the don't come up in the normal PSGet stuff. I have never personally needed nuget either, but I've messed with it just in case.
And of course the MSDocs are pretty specific about what...
...can give you in your use case, that you've already discovered.
What I've always really found odd is why MS did not include that sort of stuff in the Find-Package cmdlet.
The topic ‘Package Manager’ is closed to new replies.