Created
November 25, 2025 16:10
-
-
Save coverboy/0f689abfb49e0d7f72e877475aab6307 to your computer and use it in GitHub Desktop.
개발용 pc 를 매번 셋업하는데 예를 들어서 크롬 브라우저를 install 하고 node.js 를 설치하고 등등. 이걸 완전 자동화 할 수 없을까? on Windows
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
| # ============================================= | |
| # Windows 개발 환경 완전 자동화 설치 스크립트 | |
| # (Git 초기 설정만 수동 입력, 나머지는 unattended) | |
| # ============================================= | |
| # 관리자 권한 확인 | |
| if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
| Write-Host "관리자 권한으로 다시 실행해주세요." | |
| exit | |
| } | |
| # 실행 정책 임시 허용 (현재 세션) | |
| Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process | |
| # Winget 확인 | |
| Write-Host "Winget 확인 중..." | |
| winget --version | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "Winget이 설치되어 있지 않습니다. Windows 10은 업데이트 필요." | |
| exit | |
| } | |
| # 시스템 메모리 확인 | |
| $memGB = [math]::Round((Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory / 1GB, 2) | |
| Write-Host "총 물리 메모리: $memGB GB" | |
| # ============================================= | |
| # 설치/업그레이드 공통 함수 | |
| # ============================================= | |
| function Install-OrUpgrade($pkgId) { | |
| $info = winget show $pkgId | |
| if ($info -match "Publisher") { | |
| $installed = winget list --id $pkgId | |
| if ($installed) { | |
| Write-Host "업데이트 중: $pkgId" | |
| winget upgrade --id $pkgId -e --silent | |
| } else { | |
| Write-Host "설치 중: $pkgId" | |
| winget install --id $pkgId -e --silent | |
| } | |
| } else { | |
| Write-Host "⚠️ 공식 Publisher 확인 실패: $pkgId 설치 제외" | |
| } | |
| } | |
| # ============================================= | |
| # 사용자 동의 프로그램 | |
| # ============================================= | |
| $promptPrograms = @( | |
| @{Id="TheDocumentFoundation.LibreOffice"; Name="LibreOffice"}, | |
| @{Id="SlackTechnologies.Slack"; Name="Slack"}, | |
| @{Id="Microsoft.Teams"; Name="MS Teams"} | |
| ) | |
| foreach ($p in $promptPrograms) { | |
| $answer = Read-Host "프로그램 [$($p.Name)] 설치하시겠습니까? (y/n)" | |
| if ($answer -eq "y") { Install-OrUpgrade $p.Id } | |
| } | |
| # ============================================= | |
| # Git 설치 + 초기 설정 | |
| # ============================================= | |
| Install-OrUpgrade "Git.Git" | |
| $gitUserName = Read-Host "Git user.name 입력" | |
| $gitUserEmail = Read-Host "Git user.email 입력" | |
| git config --global user.name "$gitUserName" | |
| git config --global user.email "$gitUserEmail" | |
| # ============================================= | |
| # 필수 프로그램 설치/업그레이드 (Git 이후 unattended) | |
| # ============================================= | |
| $mandatoryPrograms = @( | |
| "Google.Chrome", | |
| "Microsoft.VisualStudioCode", | |
| "OpenJS.NodeJS.24", | |
| "EclipseAdoptium.Temurin.17.JDK", | |
| "Postman.Postman", | |
| "7zip.7zip", | |
| "JetBrains.IntelliJIDEA.Ultimate", | |
| "JetBrains.WebStorm", | |
| "JetBrains.DataGrip", | |
| "claude.cli", | |
| "Automattic.Simplenote", | |
| "Joplin.Joplin", | |
| "Notepad++.Notepad++", | |
| "Telegram.TelegramDesktop", | |
| "Meld.Meld", | |
| "Google.Antigravity", | |
| "gemini.cli", | |
| "Logitech.OptionsPlus", | |
| "Chocolatey.Chocolatey", | |
| "ChocolateyGUI.ChocolateyGUI" | |
| ) | |
| foreach ($id in $mandatoryPrograms) { Install-OrUpgrade $id } | |
| # ============================================= | |
| # 메모리 조건 설치 | |
| # ============================================= | |
| if ($memGB -ge 16) { foreach (@("Mozilla.Firefox","Brave.Brave")) { Install-OrUpgrade $_ } } | |
| if ($memGB -ge 32) { foreach (@("Oracle.VirtualBox","GIMP.GIMP")) { Install-OrUpgrade $_ } } | |
| # ============================================= | |
| # WSL2 및 Ubuntu 설치 | |
| # ============================================= | |
| Write-Host "WSL2 설치 중..." | |
| wsl --install -d Ubuntu --quiet | |
| wsl -d Ubuntu -- bash -c "sudo apt update && sudo apt upgrade -y" | |
| # ============================================= | |
| # GitHub CLI 설치/업그레이드 | |
| # ============================================= | |
| Install-OrUpgrade "GitHub.cli" | |
| # ============================================= | |
| # Windows Dark Theme 적용 | |
| # ============================================= | |
| Write-Host "Windows Dark Theme 적용..." | |
| Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "AppsUseLightTheme" -Value 0 | |
| Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "SystemUsesLightTheme" -Value 0 | |
| # ============================================= | |
| # Windows Update | |
| # ============================================= | |
| Write-Host "Windows 업데이트 확인 및 설치 중..." | |
| Install-Module -Name PSWindowsUpdate -Force -Scope CurrentUser | |
| Import-Module PSWindowsUpdate | |
| Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot | |
| # ============================================= | |
| # MS Store 앱 업데이트 | |
| # ============================================= | |
| Write-Host "MS Store 앱 업데이트 중..." | |
| Get-AppxPackage | ForEach-Object { $_.PackageFamilyName } | ForEach-Object { | |
| try { powershell -Command "Get-AppxPackage -Name $_ | ForEach { Add-AppxPackage -DisableDevelopmentMode -Register `"$($_.InstallLocation)\AppXManifest.xml`"}" } catch {} | |
| } | |
| Write-Host "설치/업데이트 완료! 재부팅을 권장합니다." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment