Status: Done (2026-03-05)
Priority: High
Component: tools/pslib/wsl/wsl-manager.ps1
Summary:
As a user, I want to run .\wsl-manager.ps1 setup-user Ubuntu-24.04 -Username wsluser -Password wsluser so that I can create a WSL user non-interactively as documented.
Description:
The documentation (docs/wsl-manager.md) and the Invoke-WslManager function both declare -Username and -Password parameters, and the internal Invoke-SetupUser function correctly skips interactive prompts when they are provided. However, the script-level param() block (line 49-59) does not declare these parameters, and the entry-point call at line 1067 does not forward them. As a result, the documented CLI usage silently ignores the parameters and always falls through to interactive prompts.
Acceptance Criteria:
- Script-level
param()declares-Usernameand-Passwordparameters - Entry-point call forwards
-Usernameand-PasswordtoInvoke-WslManager - Non-interactive
setup-userworks as documented:.\wsl-manager.ps1 setup-user <distro> -Username <user> -Password <pass> - Interactive fallback still works when parameters are omitted
- All existing tests continue to pass