Installing Windows Packages with winget

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.

Background

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.

Solution

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
https://docs.microsoft.com/en-us/windows/package-manager/winget

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

winget install Microsoft.dotnet
winget install Microsoft.PowerShell
winget install Microsoft.WindowsTerminal
winget install Postman.Postman
winget install Notepad++.Notepad++
winget install Telerik.Fiddler
winget install Microsoft.VisualStudioCode
winget install Microsoft.VisualStudio.Enterprise
winget install Microsoft.Powertoys
winget install microsoft.mousewithoutborder
winget install OBSProject.OBSStudio
winget install VideoLAN.VLC
winget install LINQPad.LINQPad
winget install WinDirStat.WinDirStat
winget install Microsoft.AzureCLI
winget install Microsoft.AzureStorageEmulator
winget install Microsoft.AzureStorageExplorer
winget install Microsoft.AzureFunctionsCoreTools
winget install Microsoft.EdgeDev
winget install Microsoft.Teams
winget install GitHub.cli

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.

Conclusion

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!

-Frog Out

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s