Windows – Understand difference between Package Management (formerly OneGet) and Chocolatey, and Get Started using OneGet in Win10 RTM

chocolateypowershellwindows 10windows-packagemanagement

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?

Best Answer

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.

Related Question