Last active
October 23, 2025 08:07
-
-
Save patelnwd/1b05d23732045f5fa39f5464de9b6054 to your computer and use it in GitHub Desktop.
Here’s a Windows PowerShell script that installs a full development environment — including Node.js, Nginx, Python, MySQL or PostgreSQL, and VS Code — using winget, the official Windows package manager.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requires Windows 10/11 with winget installed | |
| # Run this script as Administrator | |
| Write-Host "🚀 Starting Developer Environment Setup..." -ForegroundColor Cyan | |
| # Ensure Winget is available | |
| if (!(Get-Command winget -ErrorAction SilentlyContinue)) { | |
| Write-Host "⚠️ Winget not found. Please install App Installer from Microsoft Store." -ForegroundColor Red | |
| exit 1 | |
| } | |
| # Helper function for installing apps | |
| function Install-App { | |
| param([string]$appName, [string]$packageId) | |
| Write-Host "`n📦 Installing $appName..." | |
| winget install --id $packageId --silent --accept-package-agreements --accept-source-agreements | |
| } | |
| # System Update | |
| Write-Host "`n🔄 Updating all system packages..." | |
| winget upgrade --all --silent --accept-package-agreements --accept-source-agreements | |
| # Developer essentials | |
| Install-App "Git" "Git.Git" | |
| Install-App "Node.js LTS" "OpenJS.NodeJS.LTS" | |
| Install-App "Python 3" "Python.Python.3.14" | |
| Install-App "Nginx" "nginxinc.nginx" | |
| Install-App "Visual Studio Code" "Microsoft.VisualStudioCode" | |
| Install-App "PostgreSQL" "PostgreSQL.PostgreSQL.16" | |
| Install-App "MySQL" "Oracle.MySQL" | |
| Install-App "Docker Desktop" "Docker.DockerDesktop" | |
| Install-App "Google Chrome" "Google.Chrome" | |
| Install-App "Yarn" "Yarn.Yarn" | |
| # Optional tools (uncomment as needed) | |
| # Install-App "Postman" "Postman.Postman" | |
| # Install-App "MongoDB Compass" "MongoDB.Compass" | |
| # Install-App "Redis" "Microsoft.OpenJDK.17" | |
| # Verify installations | |
| Write-Host "`n✅ Verifying installations..." | |
| $tools = @("node", "npm", "python", "nginx", "code", "git", "docker") | |
| foreach ($tool in $tools) { | |
| Write-Host "`n🔹 Checking $tool..." | |
| try { | |
| & $tool --version | |
| } catch { | |
| Write-Host "⚠️ $tool not found." -ForegroundColor Yellow | |
| } | |
| } | |
| Write-Host "`n🎉 Developer setup complete! You may need to restart your terminal." -ForegroundColor Green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment