All the people in my dev team and myself have been experiencing a big issue with WSL since a week.
Whenever we try to launch WSL, we get:
Access is denied.
[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.
We have the same error message whether we launch an Ubuntu or Debian session, even as Administrator.
When we try to run wsl from Powershell as Administrator, it is the same:
PS C:Users<myuser>> wsl
Access is denied.
Of course we all restarted our computers, we tried to catch specific errors but nothing worked…
Do you have an idea guys?
It’s most probable an issue with Azure / Windows update.
Windows version: 10 / 11 (we had the same bug on both OS versions)
WSL version: 2.2.4.0
2
Actually as I was asking this questions our IT engineer found a solution.
If this happens to you, launch Powershell as Admnistrator and run:
Add-MpPreference -AttackSurfaceReductionOnlyExclusions "C:windowssystem32wsl.exe"
Add-MpPreference -AttackSurfaceReductionOnlyExclusions "C:Program FilesWSLwsl.exe"
It automatically solved the problem, without having the restart the PC.
The problem is due to an issue with a recent update of Defender