I have installed firts nuget with the command Install-PackageProvider –Name nuget -RequiredVersion 22.214.171.124 -Scope AllUsers. Then, I have restarted Powersehell as described in Powershell API.
Afte that I install chocolatey provider with Install-PackageProvider –Name chocolatey -RequiredVersion 126.96.36.199 -Scope AllUsers, This makes chocolatey available as provider but it doesn't really install the chocolate provider. To get to install chocolatey provider, after that you have to do get-packageprovider -name chocolatey.
If it is not a bug, it is very confusing.
Laura, I think 'Install-PackageProvider –Name chocolatey' installs the provider but not get imported to your current PowerShell session. You can first install it and then imported by following the steps below:
Install-PackageProvider –Name chocolatey -RequiredVersion 188.8.131.52
Import-PackageProvider -Name Chocolatey -force
Now we can use it: Find-package -ProviderName Chocolatey ...
If you are using the WMF 5.0 RTM, you can directly use the chocolatey provider (e.g., find-package -ProviderName Chocolatey) after calling install-packageprovider.
Since Chocolatey gets bootstrapped by PackageManagement, you do not need to call install-packageprovider. You can directly use it by 'find-package -ProviderName Chocolatey', and PackageManagement will install and import the provider for you.