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?

9
  • related: superuser.com/questions/952223/…
    – Warren P
    Sep 22, 2015 at 17:30
  • But is it on every windows system or NOT? I believe that is a valid question worthy of clarification.
    – Warren P
    Sep 22, 2015 at 17:48
  • OneGet from my understanding is a package manager aggregator that seeks to provide a common interface to all the different package managers. Sep 22, 2015 at 21:38
  • 1
    The "in flux" could be that the OneGet developer at Microsoft moved on to other projects so some things (like the Chocolatey provider work) have not been brought up to speed yet, plus the developers helping with the Chocolatey provider integration have been blocked on either Choco adding features and/or no longer having a OneGet developer to review the work. Sep 22, 2015 at 21:41

2 Answers 2

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.

3
  • 4
    Register the location as https, not http. Otherwise there is no verification that you are hitting the secure source. Sep 22, 2015 at 22:17
  • Looks like you can also do a Find-Package sysinternals -ProviderName chocolatey and it will prompt to install the chocolatey package provider. It will do that for all the default providers. Based on the help, that's {Programs | msu | msi | Bootstrap | PSModule | Chocolatey | nuget | chocolatey}. Unsure if it's officially supported right now.
    – lordcheeto
    Oct 28, 2015 at 2:16
  • It appears that you now need to run Install-PackageProvider -Name chocolatey first in order to use Chocolatey as a package provider: github.com/OneGet/oneget/issues/182 Jul 31, 2016 at 8:35
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.

5
  • What are the one-get commands that you speak of? I can't find any such commands on my system. Do I have to download a .psd1 for OneGet from GitHub? If so, how is it true to say it "is included in the powershell"?
    – Warren P
    Sep 22, 2015 at 17:44
  • According to this, it is included in RTM but then it contradicts itself and says WMF 5 must first be installed: github.com/OneGet/oneget Sep 22, 2015 at 18:15
  • 1
    @MahmoudAl-Qudsi - WMF 5 is included in the version of Powershell installed out of the box on Windows 10 machines
    – Ramhound
    Sep 22, 2015 at 18:58
  • It looks like it IS installed, but only usable from elevated (Admin) powershell.
    – Warren P
    Sep 22, 2015 at 19:35
  • 3
    Is it possible to use OneGet to install Chocolatey, and from then on, only use Chocolatey commands like choco install? May 23, 2016 at 19:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .