Can't restart the WSL Net Adapter
Windows Build Number
Microsoft Windows [Version 10.0.22000.71]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.10.43
Distro Version
Ubuntu 20.04.2 LTS
Other Software
No response
Repro Steps
In Windows PowerShell, I run Ipconfig /all to list my network adapters. I can see "Ethernet adapter vEthernet (WSL)" is listed as the network adapter I would like to reset.
I then type Restart-NetAdapter -Name "vEthernet (WSL)" in Windows PowerShell to restart the network adapter, but I get an error message.
I've tried uninstalling and reinstalling Ubuntu and WSL from the "Turn Windows Features on or off" app. I've also tried running the command with elevated permissions with the same error.
Expected Behavior
Once I run Restart-NetAdapter -Name "vEthernet (WSL)" the network adapter should successfully be reset.
Actual Behavior
> Restart-NetAdapter -Name "vEthernet (WSL)"
Restart-NetAdapter : {Application Error} The exception %s (0x
At line:1 char:1
+ Restart-NetAdapter -Name "vEthernet (WSL)"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_NetAdapter...SKTOP-DUPV0KE"):ROOT/StandardCimv2/MSFT_NetAdapter) [Re
start-NetAdapter], CimException
+ FullyQualifiedErrorId : Windows System Error 574,Restart-NetAdapter
Diagnostic Logs
No response
@Michael-Brooks - what is your goal with resetting the network adapter?
@benhillis I'm currently having issues with Docker Desktop which can be seen with #7204. Someone in the Docker Desktop issues said that restarting the WSL network adapter resolved their issue. I thought that it might also resolve mine. For reference, this is the issue talking about restarting the network adapter... https://github.com/docker/for-win/issues/11685#issuecomment-882698440
I managed to restart the network adapter with elevated permissions which didn't work before. I'm closing the issue but it still didn't fix my problem with #7204.