Initialize-DeveloperMachine
0.1.0
Bootstrap a Windows developer machine: relocate caches off C:, install winget tools, set up WSL + Docker Desktop. Modular tasks, idempotent, dry-run support.
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) gonace. All rights reserved.
Package Details
Author(s)
- gonace
Tags
Developer Bootstrap Windows WSL DockerDesktop winget Junction Cache NuGet npm
Functions
PSEditions
Dependencies
This module has no dependencies.
Release Notes
First publish of `Initialize-DeveloperMachine` to the PowerShell Gallery.
```powershell
Install-Module Initialize-DeveloperMachine -Scope CurrentUser
Initialize-DeveloperMachine -Task All
```
## What's included
- **Cache + tool home relocation** off `C:` for NuGet, NPM, vcpkg, .NET CLI, Claude, and Docker — via user environment variables and NTFS junctions.
- **WSL setup** (`Wsl` task): installs `Microsoft.WSL` via winget, refreshes the kernel, writes `~/.wslconfig` from your config.
- **WSL distros** (`WslDistros` task): installs each distro you list and relocates the VHDX to the drive you pick.
- **Docker Desktop** (`DockerDesktop` task): bootstraps DD on first run, relocates the `docker-desktop` distro, and patches `CustomWslDistroDir` in `settings-store.json` so DD agrees with the new location.
- **Metadata-driven winget pass**: each task declares its package dependencies; the script unions and dedupes them and runs a single install pass before any task action.
- **Idempotent**: subsequent runs are no-ops by design. A small `%LocalAppData%\Initialize-DeveloperMachine\winget-state.json` tracks packages that install but winget can't redetect afterwards (e.g. `Microsoft.DotNet.Framework.DeveloperPack_4`) so they don't reinstall every run.
- **Dry-run** support: `-WhatIf` previews every state-changing action; `-Confirm` prompts before each one.
- **Configurable** via `Initialize-DeveloperMachine.config.json`. Lookup order: `-ConfigFile` parameter → `$PWD` → `%USERPROFILE%\.config\Initialize-DeveloperMachine\config.json` → module folder.
- **Standardised log levels**: `[INFO]` / `[WARN]` / `[ERROR]` / `[SKIP]` / `[DEBUG]` markers with colour coding so output is easy to scan and CI rules can grep on severity.
## Notes
- **First-time WSL2 activation** on a machine that's never had it enabled requires one reboot before the `DockerDesktop` task's distro registration can complete. Already-active machines aren't affected.
- Tested end-to-end on Windows 11 client. CI runs the path/junction/winget portions on `windows-latest`; full WSL + Docker Desktop bootstrap is exercised manually on developer machines (see README "CI coverage" for the rationale).
See the [README](https://github.com/gonace/Initialize-DeveloperMachine#readme) for full configuration details, the task list, and known winget quirks.
FileList
- Initialize-DeveloperMachine.nuspec
- Initialize-DeveloperMachine.ps1
- Initialize-DeveloperMachine.psd1
- Initialize-DeveloperMachine.psm1
- LICENSE
- README.md
- lib\CacheLocation.ps1
- lib\Docker.ps1
- lib\EnvBroadcast.ps1
- lib\Junction.ps1
- lib\Lock.ps1
- lib\Node.ps1
- lib\PathsConfig.ps1
- lib\Preflight.ps1
- lib\Spinner.ps1
- lib\Status.ps1
- lib\TaskMenu.ps1
- lib\Winget.ps1
- lib\Wsl.ps1
- tasks\10-NuGet.ps1
- tasks\20-NPM.ps1
- tasks\30-VCPKG.ps1
- tasks\40-Dotnet.ps1
- tasks\50-Claude.ps1
- tasks\60-Wsl.ps1
- tasks\70-WslDistros.ps1
- tasks\90-DockerDesktop.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.1.2 | 4 | 5/7/2026 |
| 0.1.1 | 3 | 5/7/2026 |
| 0.1.0 (current version) | 5 | 5/7/2026 |