Another great post from Scott Hanselman about keeping WSL instances up to date automatically within Windows 10:
I’ve done this on my development machine (which is running Windows 10 Pro) like this:
Here’s a sample run of the script:
As you can see, this is a Powershell script that does all for my 2 WSL instances. For Linux Development I’m using debian and for testing kali.
Then (as Scott also mentioned in his post) I’m using the task planning feature of Windows 10 to actually run the script automatically:
The script is scheduled to be executed once a week around noon on Mondays.
So this all resultts in a very handy solution for keeping all the various WSL instances up to date.