- In run_wsl2-at_startup.ps1, replace
Ubuntu-20.04
with your distribution name. - In run_wsl2-at_startup.ps1, replace
$windows_port = 6022
with your desired port for exposing ssh server from wsl2 - In runner.vbs, replace
C:\Users\cchi\dev\wsl_network\PsExec.exe
andC:\Users\cchi\dev\wsl_network\run_wsl2_at_startup.ps1
with the actualy path to your copy of this repo. - In task scheduler, setup a task following this tutorial, but action to execute their
run_wsl2_at_startup.vbs
with the path torunner.vbs
in this repo. - Run the task manually in task scheduler and check the content of stderr.txt and stdout.txt (created by the
run_wsl2_at_startup.ps1
) for error. Ideally, both of these files should be empty.