5

I am confused about Chocolatey, and OneGet (renamed later Package Management).

Does one currently just install chocolatey, and use it, if one is on Windows 10 Pro RTM, which supposedly shipped with OneGet cmdlets inside powershell already? (They don't appear to exist on my Windows 10 Pro machine).

First, the practical question: How does one install and work with Package Management (formerly OneGet) inside Windows 10? On my machine if I type get-command -Module OneGet I get NO results. No cmdlet with a name like Get-PackageProvider currently exists on my machine. Yet I read that OneGet would be part of, or ship in Windows 10 RTM. I also read you can add the one-get cmdlets using Import-Module but I can't get that to work, either.

Second, the comprehension question: Is OneGet really a meta-manager for what will in the future be a variety of sources with Chocolatey being only one repository source, or have I misunderstood? I have read that things are "in flux" right now. What is the situation and when will it be cleaned up?

Warren P
  • 3,019

2 Answers2

5

It looks like it IS installed, and that the pre-release blog posts that say to type Import-Module -Name OneGet are no longer correct, for Win10 rtm.

However, you still need to manually add a package source like this, from an Administrator-privilege level PowerShell, in Windows 10 professional:

Register-PackageSource -Name chocolatey -Location https://chocolatey.org/api/v2 -Provider PSModule -Trusted -Verbose

You can search like this:

Find-Package paint -provider Chocolatey

Above should find the actual choco package name of Paint.net for me.

Then you can install something like this:

Install-Package paint.net -provider Chocolatey

(For example, to install Paint.NET).

enter image description here

If you can't find Install-package cmdlet (it appears like it is not installed?) switch from regular non-elevated powershell, to an elevated (Administrator) powershell.

Warren P
  • 3,019
2

I'm not sure why you've been downvoted, but one way to look at the current mess that is the Windows package ecosystem is that the OneGet is the new and officially-sanctioned (by MS) package manager for Windows 10 (and beyond). OneGet is "inspired by" Chocolatey, to an extent that it can use the same repository/upstream provider as the Chocolatey sources.

OneGet shipped in Windows 10 RTM and is included in the PowerShell. It's not really "ready" for use with 3rd party packages yet, though the idea is that at some point Microsoft will (maybe?) unveil a 3rd party repository/ecosystem to supplant Chocolatey's, though if that's still going to happen at all is anyone's guess now.

For now, to use OneGet instead of Chocolatey (which basically gives you no advantage other than not having to install Chocolatey), you can tack on the command line -provider Chocolatey to your OneGet commands to have them connect to and use the Chocolatey provider.