How do I use Windows 10 built-in package manager?
You were close. First, you have to set the execution policy to allow scripts, otherwise it'll silently fail while reporting success (bug):
Set-ExecutionPolicy RemoteSigned
Both the package provider (Chocolatey plugin) and package source (URL to specific Chocolatey repo) need to be installed/registered with PackageManagement. Get-PackageProvider with the -Force
flag causes it to bootstrap, which apparently takes care of both (more in the help about -Force
):
Get-PackageProvider Chocolatey -Force | Out-Null
Then I can search for the package:
Find-Package vlc -Force
Name Version Source Summary
---- ------- ------ -------
vlc 2.2.1.20150630 chocolatey VLC Media Player
And install it (-Force
so it doesn't prompt for confirmation):
Install-Package vlc -Force | Out-Null