Chocolatey is an open-source project that provides developers and admins alike a better way to manage Windows software.


So what this script does is install chocolatey (if not installed yet) and install all the packages that are 'basic' for a .NET developer.


You also can customize this script with your apps that you would like using the following link: https://community.chocolatey.org/packages

Copy this command into your code editor of preference, save this file with the extension of .ps1 (PowerShell).


#Requires -RunAsAdministrator

# install chocolatey if not installed
if (!(Test-Path -Path "$env:ProgramData\Chocolatey")) {
Invoke-Expression((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}

#auto enable install
powershell choco feature enable -n=allowGlobalConfirmation

#for each package in the list run install
$Packages = 'googlechrome','git','postman',
'notepadplusplus','ditto','putty','sumatrapdf','7zip.install','slack',
'vcredist140','jre8','sql-server-management-studio','dotnetfx', 'wsl2','wsl-ubuntu-2004',
'microsoft-windows-terminal','docker-desktop','nvm','wget','vscode.install'

ForEach ($PackageName in $Packages) { choco install $PackageName -y }


Some apps are not necessary, but it is good to have such as ditto, putty, sumatrapdf, notepadplusplus and postman, wget, nvm. As this script is customizable, you can modify this script as much as you like.


Run this command into your powershell - the user must have administrator rights permission


Start-Process -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location \`"$PWD\`"; .\CUSTOM_PATH\CUSTOM_NAME.ps1"


You can also update all these apps through the PowerShell command, just open the PowerShell/windows-terminal and run this command:


choco upgrade all -y



Credits: