If you have any experience using Linux you probably know they have awesome command line package management, which until recently we never had on Windows. There is nothing worse than having a fresh install of Windows and needing to go to about 50 websites to download and install the software you use every day. It is so easy being able to type a quick command into PowerShell and have your favourite application install or update for you. You could even write a PowerShell script that you run and it installs all your apps for you.
The most popular package manager for Windows is Chocolatey and this is how you install it and use it.
Firstly let’s have a look at what Package Providers you currently have installed so we can see if we need to install Chocolatey or if you already have it. Get-PackageProvider is the command we will use:
We don’t have it so let’s install. Get-PackageProvider -Name Chocolatey will do the job. Select Y for yes and it will install.
One it has gone through the install process we can do Get-PackageProvider again and you will see, like below, you now have Chocolatey listed.
Now that Chocolatey is installed to get a list of packages it hosts that we can install we can do Find-Package -ProviderName Chocolatey. This will list all the packages which is a very long list and isn’t really a good idea, but if you want to you can scroll through and see if there is anything interesting you want to install.
If you know what you want to install or have a rough idea what it might be called you can search using wildcards. This will narrow the list down to a manageable amount. For this example I want to install an application called ‘youtube-dl’. If I don’t know the full name but know it has something to do with YouTube I can search for it. To do this I use the same command as above in step 4 but add the -Name parameter and my search terms.
Find-Package -Name *youtube* -ProviderName Chocolatey
Now that we know it is called ‘youtube-dl’ we can use its name to install it.
Install-Package -Name youtube-dl -ProviderName Chocolatey
Once you accept to install the software it will go through and download and install. When it is finished you can check what packages you have installed by running Get-Package.
As you can see below we now have a package installed and ready to use called ‘youtube-dl’.