In this post I’ll tell you about the Windows Package Manager and winget tool (currently in preview) for installing Windows packages. Feel free to use my sample script as a starting point for downloading useful tools and applications for Windows.
Last week my primary laptop (~4 months old) ran into some issues and I attempted a restore from a weekly backup taken just a few days before. Unfortunately the restore put the machine into an unusable state (a sign that I won’t be using that backup software any longer). After a re-install of Windows I was once again put to the task of re-installing dozens of applications. I have gone through this process many times before, but this time around I thought it would be good to test out the new Windows Package Manager and winget tool.
Disclaimer: At time of writing, Windows Package Manager and the winget tool are in public preview and may be substantially modified before they are generally available. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Use the winget tool to install and manage applications
The first step is to install the winget tool. There are a few options for installation and I chose to download from the releases from the winget repository.
Once installed you can run commands for search, show, install and more. I tested a few installations interactively but once I got the hang of it I scripted out a list of commonly used tools and applications that I use on almost all of my machines. Below is my script that you are free to copy and adapt as you see fit. I have chosen PowerShell to run the script but that is not a requirement.
Note: If you do not see the below Gist please refer to code at this location: PS-WinGet_Apps_To_Install.ps1
Do read the note (link) in documentation about scripting winget. If an installer launches a new process that can lead to starting the next installation before the previous completes. This may result in unexpected issues or failed installations.
I found winget to be very helpful in re-installing a dozen or more applications on my refreshed laptop. The next time you need to install (or re-install) an application I would encourage you to check for it with the Windows Packager Manager and winget tool. Happy installing!