Setup your development environment on your new Windows machine
Ali Heydari
⏳ 2 min read
Setup your development environment on your new Windows machine
Installing new applications and tools for first time after you buy a new Windows machine or reinstalled it's OS is a tedious task. You have to go to each application's website, download the installer, run it, and follow the installation wizard (Next, Next, Next, ... Winget to automate this process.
). This process is time consuming and boring, However, it's a must do task not only for developers but for any user. Microsoft has introduced a new package manager calledWhat is Winget?
Here is a quick guide to get you started with Winget.
-
Windows Package Manager (aka WinGet) comes pre-installed with Windows 11 (21H2 and later). It can also be found in the Microsoft Store or be installed directly.
-
winget list
shows all the applications that you currently have installed on your machine. -
winget search <app-name>
searches for an application in the winget repository. You can use this command to find the exact name of the application you want to install. -
winget install <app-name>
installs the application. You can use this command to install any application from the winget repository. -
winget export
exports the list of all installed applications to a JSON file. This can be helpful if you want to see what you have installed if you are planning to reinstall your OS or buy a new machine.
You can install each app individually using the winget install
command, but that's not the best way to do it if you have a long list of applications to install.
You can create a PowerShell script to automate the installation process.
Option 1: export and import
If you already have a windows machine with all the applications you need installed, you can export the list of installed applications using the winget export
command.
This will create a JSON file with the list of all installed applications. You can use this file to install the same applications on another machine.
Here you go, all your applications are installed on your new machine!
Option 2: create a PowerShell script
If you don't have a machine with all the applications you need installed, you can create a PowerShell script to install all the applications you need. Here is my script that installs some of the applications I use on my machine.
Save this script as install-apps.ps1
and run it using PowerShell.
Tada! All your applications are installed on your new machine!
Tags: