there is two scripts:
- powershell dns.ps1
- bash dns.sh
the bash script dns.sh (ran from WSL) calls the powershell script dns.ps1 wich retrieves the DNS informations
you can write directly its output to resolv.conf (as root):
./dns.sh > /etc/resolv.conf
- configure in dns.sh line 5 the absolute path to the powershell script
- JQ is required : apt install jq