If you have even a passing familiarity with Linux, you’re probably aware of the concept of package management. The goal is to simplify the installing, upgrading, configuring and removing software. One of the key features is dependency management: if your software depends on some other software that isn’t already installed, the package manager will give you the option to install it.
Microsoft provides a Windows Package Manager, known as winget. However, at the time of writing it’s only been around for a couple of years and I got a hash error when I tried to use it to install Google Chrome.
A popular third-party option is Chocolatey, but it depends on NuGet which is a package manager in its own right. I prefer to use Scoop. The latest install instructions are on the website, but I’ll go through how I installed it on Windows 11.
- Open PowerShell.
- [Optional] Enter
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. This enables a remote script to run the first time.
Invoke-WebRequest get.scoop.sh | Invoke-Expression. This installs Scoop.
scoop bucket add extras. The extras bucket includes software that doesn’t match the main criteria for inclusion.
scoop bucket add nonportable. The nonportable bucket includes software that must be installed to a specific location.
scoop install git. Even if you’re not using Git, Scoop uses it to perform updates.
scoop update. This will update the buckets you added.
Now you’re ready to add whatever packages you like. Here are some examples:
scoop install docker
- GitHub Desktop:
scoop install github
- Google Chrome:
scoop install googlechrome
scoop install helm
scoop install notepadplusplus
- SQL Server Management Studio:
scoop install sql-server-management-studio-np
- Visual Studio Code:
scoop install vscode
You can verify the software has been correctly installed by viewing the
To update all your installed packages to the latest version, enter
scoop update all. When I was creating a VM for developer training with numerous prerequisite software packages, I found it useful to put this command in a startup script.
Having recently revisited the VM setup for Azure Labs, I’ve discovered a few gotchas. Here’s how I got it working.
- Create an Azure Labs template VM from the Windows 10 N Enterprise with Visual Studio 2019 Community image in the marketplace.
- Start the VM, then from the standard shell enter:
runas /trustlevel:0x20000 powershell.exe. The Scoop install script won’t run with admin privileges. The
ExecutionPolicydirective doesn’t work when the shell is run as administrator. And the VM template doesn’t give you the option to start a shell without admin privileges.
- From PoweShell, enter:
iwr get.scoop.sh -useb | iex. The
-usebdirective is required with Windows N (something to do with Internet Explorer).
- Close both shells and then open PoweShell and enter
scoop bucket add main.
You can now carry on as normal. You don’t need to install Git, because it’s included with the VS 2019 Community image.
Image: Original by Ian Dooley.