Skip to content

Instantly share code, notes, and snippets.

@zoyo23
Last active April 27, 2025 18:10
Show Gist options
  • Save zoyo23/f644cf1303bf6bb76af51f2d05ce5676 to your computer and use it in GitHub Desktop.
Save zoyo23/f644cf1303bf6bb76af51f2d05ce5676 to your computer and use it in GitHub Desktop.
Preparo Ambiente Windows Chocolatey
# Salve este código em um arquivo .ps1 (ex: install-tools.ps1) e execute como Administrador. ENCONDE UTF-8 BOM
# Configuração inicial
$ErrorActionPreference = "Stop"
Write-Host "============================================" -ForegroundColor Cyan
Write-Host " INICIANDO INSTALAÇÃO DE FERRAMENTAS (ADMIN) " -ForegroundColor Cyan
Write-Host "============================================" -ForegroundColor Cyan
# 1. Instala o Chocolatey
Write-Host "`n`n[1/10] ------------------------ INSTALANDO CHOCOLATEY ------------------------ " -ForegroundColor Yellow
Set-ExecutionPolicy Bypass -Scope Process -Force -ErrorAction SilentlyContinue
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | Out-Host
Write-Host "`n`n[1/10] ------------------------ ✓ INSTALADO CHOCOLATEY ------------------------ " -ForegroundColor Yellow
# 2. Instala Windows Terminal
Write-Host "`n`n[2/10] ------------------------ INSTALANDO WINDOWS TERMINAL ------------------------ " -ForegroundColor Yellow
choco install -y microsoft-windows-terminal --no-progress | Out-Host
Write-Host "`n`n[2/10] ------------------------ ✓ INSTALADO WINDOWS TERMINAL ------------------------ " -ForegroundColor Yellow
# 3. Instala VS Code
Write-Host "`n`n[3/10] ------------------------ INSTALANDO VS CODE ------------------------ " -ForegroundColor Yellow
choco install -y vscode --no-progress | Out-Host
Write-Host "`n`n[3/10] ------------------------ ✓ INSTALADO VS CODE ------------------------ " -ForegroundColor Yellow
# 4. Instala Visual Studio 2022 Community
Write-Host "`n`n[4/10] ------------------------ INSTALANDO VISUAL STUDIO 2022 ------------------------ " -ForegroundColor Yellow
choco install -y visualstudio2022community --no-progress | Out-Host
Write-Host "`n`n[4/10] ------------------------ ✓ INSTALADO VISUAL STUDIO 2022 ------------------------ " -ForegroundColor Yellow
# 5. Instala SDKs do .NET
Write-Host "`n`n[5/10] ------------------------ INSTALANDO SDKs DO .NET ------------------------ " -ForegroundColor Yellow
choco install -y dotnet-7.0-sdk --no-progress | Out-Host
choco install -y dotnet-8.0-sdk --no-progress | Out-Host
choco install -y dotnet-9.0-sdk --no-progress | Out-Host
Write-Host "`n`n[5/10] ------------------------ ✓ INSTALADO SDKs DO .NET ------------------------ " -ForegroundColor Yellow
# 6. Instala Node.js
Write-Host "`n`n[6/10] ------------------------ INSTALANDO NODE.JS ------------------------ " -ForegroundColor Yellow
choco install -y nodejs --no-progress | Out-Host
Write-Host "`n`n[6/10] ------------------------ ✓ INSTALADO NODE.JS ------------------------ " -ForegroundColor Yellow
# 7. Instala Docker Desktop
Write-Host "`n`n[7/10] ------------------------ INSTALANDO DOCKER DESKTOP ------------------------ " -ForegroundColor Yellow
choco install -y docker-desktop --no-progress | Out-Host
Write-Host "`n`n[7/10] ------------------------ ✓ INSTALADO DOCKER DESKTOP ------------------------ " -ForegroundColor Yellow
# 8. Configura WSL2
Write-Host "`n`n[8/10] ------------------------ CONFIGURANDO WSL2 ------------------------ " -ForegroundColor Yellow
wsl --install | Out-Host
wsl --set-default-version 2 | Out-Host
wsl --update | Out-Host
Write-Host "`n`n[8/10] ------------------------ ✓ CONFIGURADO WSL2 ------------------------ " -ForegroundColor Yellow
# 9. Instala AWS CLI
Write-Host "`n`n[9/10] ------------------------ INSTALANDO AWS CLI ------------------------ " -ForegroundColor Yellow
choco install -y awscli --no-progress | Out-Host
Write-Host "`n`n[9/10] ------------------------ ✓ INSTALADO AWS CLI ------------------------ " -ForegroundColor Yellow
# 10. Instala Git
Write-Host "`n`n[10/10] ------------------------ INSTALANDO GIT ------------------------ " -ForegroundColor Yellow
choco install -y git --no-progress | Out-Host
Write-Host "`n`n[10/10] ------------------------ ✓ INSTALADO GIT ------------------------ " -ForegroundColor Yellow
# Lista distros disponíveis (opcional)
Write-Host "`nDistribuições Linux disponíveis:" -ForegroundColor Magenta
wsl --list --online | Out-Host
# Sugere instalar uma distro (substitua <NomeDaDistro> pelo desejado, ex: Ubuntu-22.04)
Write-Host "`nPara instalar uma distro, execute manualmente:" -ForegroundColor Cyan
Write-Host "wsl --install -d Ubuntu-22.04" -ForegroundColor White
# Finalização
Write-Host "`n============================================" -ForegroundColor Cyan
Write-Host " INSTALAÇÃO CONCLUÍDA! REINICIE O COMPUTADOR. " -ForegroundColor Cyan
Write-Host "============================================" -ForegroundColor Cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment