...
Code Block | ||||
---|---|---|---|---|
| ||||
find-packageprovider |
Listing Installed Package Providers
Code Block | ||||
---|---|---|---|---|
| ||||
get-packageprovider |
Adding a Package Provider
Code Block | ||||
---|---|---|---|---|
| ||||
// install the package provider
install-packageprovider <provider-name> -verbose
// add the package provider to the list of available providers on your machine
import-packageprovider <provider-name>
// check if package provider installed correctly
get-packageprovider -verbose |
Code Block | ||||
---|---|---|---|---|
| ||||
// install the package provider
install-packageprovider ChocolateyGet -verbose
// add the package provider to the list of available providers on your machine
import-packageprovider ChocolateyGet
// you might have to install something from the package provider to allow its commands to be executed, for example chocolatey requires the choco.exe file to be available as a Windows application, use the command below to install chocolatey as a separate Windows application
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
// check if package provider installed correctly
get-packageprovider -verbose |
Installing a Package
Code Block | ||||
---|---|---|---|---|
| ||||
// check if a package provider is available on your local machine
get-packageprovider -verbose
install-package <package-name>
// OR
install-package -source <provider-name> -name <package-name> |
Code Block | ||||
---|---|---|---|---|
| ||||
// see what package providers are available on your machine
get-packageprovider -verbose
install-package mysql
// you might get a warning ssaying there are multiple source providers, rerun the command as follows
install-package -source chocolatey -name mysql |
Complete example of installing a Package Provider and a Package
Code Block | ||||
---|---|---|---|---|
| ||||
// Check if the package provider exists
find-packageprovider ChocolateyGet -verbose
// install the package provider
install-packageprovider ChocolateyGet -verbose
// add the package provider to the list of available providers on your machine
import-packageprovider ChocolateyGet
// now install a package
get-packageprovider -verbose
// if the above might fail because choco.exe needs to be aavailable, use the command below to install chocolatey as a separate Windows application
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
install-package mysql
// you might get a warning ssaying there are multiple source providers, rerun the command as follows
install-package -source chocolatey -name mysql |