Skip to content

Commit e3b1a20

Browse files
committed
Update mde-plugin-wsl.md
1 parent 9256a74 commit e3b1a20

File tree

1 file changed

+66
-62
lines changed

1 file changed

+66
-62
lines changed

defender-endpoint/mde-plugin-wsl.md

Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,20 @@ If your Windows Subsystem for Linux isn't installed yet, follow these steps:
8383

8484
3. Confirm that WSL is installed and running.
8585

86-
1. Using Terminal or Command Prompt, run `wsl –-update` to make sure you have the latest version.
86+
1. Using Terminal or Command Prompt, run `wsl –-update` to make sure you have the latest version.
8787

88-
2. Run the `wsl` command to ensure WSL is running before testing.
88+
2. Run the `wsl` command to ensure WSL is running before testing.
8989

9090
4. Install the plug-in by following these steps:
9191

92-
1. Install the MSI file downloaded from the onboarding section in the Microsoft Defender portal (**Settings** > **Endpoints** > **Onboarding** > **Windows Subsystem for Linux 2 (plug-in)**).
92+
1. Install the MSI file downloaded from the onboarding section in the Microsoft Defender portal (**Settings** > **Endpoints** > **Onboarding** > **Windows Subsystem for Linux 2 (plug-in)**).
9393

94-
2. Open a command prompt/terminal and run `wsl`.
94+
2. Open a command prompt/terminal and run `wsl`.
9595

9696
You can [deploy the package using Microsoft Intune](/mem/intune/apps/lob-apps-windows).
9797

9898
> [!NOTE]
99-
> If `WslService` is running, it stops during the installation process. You do not need to onboard the subsystem separately; instead, the plug-in automatically onboards to the tenant the Windows host is onboarded to.
99+
> If `WslService` is running, it stops during the installation process. You do not need to onboard the subsystem separately. Instead, the plug-in automatically onboards to the tenant the Windows host is onboarded to.
100100
101101
## Installation validation checklist
102102

@@ -161,7 +161,7 @@ After installing the plug-in, the subsystem and all its running containers are o
161161

162162
2. Filter using the tag **WSL2**.
163163

164-
:::image type="content" source="media/mdeplugin-wsl/wsl-device-inventory.png" alt-text="Screenshot showing device inventory filter" lightbox="media/mdeplugin-wsl/wsl-device-inventory.png":::
164+
:::image type="content" source="media/mdeplugin-wsl/wsl-device-inventory.png" alt-text="Screenshot showing device inventory filter" lightbox="media/mdeplugin-wsl/wsl-device-inventory.png":::
165165

166166
You can see all WSL instances in your environment with an active Defender for Endpoint plug-in for WSL. These instances represent all distributions running inside WSL on a given host. The hostname of a *device* matches that of the Windows host. However, it's represented as a Linux device.
167167

@@ -175,7 +175,7 @@ The timeline is populated, similar to Defender for Endpoint on Linux, with event
175175

176176
The plug-in onboards the WSL machine with the tag `WSL2`. Should you or your organization need a custom tag, please follow the steps outlined below:
177177

178-
1. Open Registry Editor as an administrator
178+
1. Open Registry Editor as an administrator.
179179

180180
2. Create a registry key with the following details:
181181

@@ -186,9 +186,9 @@ The plug-in onboards the WSL machine with the tag `WSL2`. Should you or your org
186186

187187
3. Once the registry is set, restart wsl using the following steps:
188188

189-
1. Open Command Prompt and run the command, `wsl --shutdown`.
189+
1. Open Command Prompt and run the command, `wsl --shutdown`.
190190

191-
2. Run the `wsl` command.
191+
2. Run the `wsl` command.
192192

193193
4. Wait for 5-10 minutes for the portal to reflect the changes.
194194

@@ -255,87 +255,91 @@ DeviceProcessEvents
255255

256256
## Troubleshooting
257257

258-
1. The command `healthcheck.exe` shows the output, "Launch WSL distro with 'bash' command and retry in five minutes."
258+
### The command `healthcheck.exe` shows the output, "Launch WSL distro with 'bash' command and retry in five minutes."
259259

260-
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check.png" alt-text="Screenshot showing PowerShell output." lightbox="media/mdeplugin-wsl/wsl-health-check.png":::
260+
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check.png" alt-text="Screenshot showing PowerShell output." lightbox="media/mdeplugin-wsl/wsl-health-check.png":::
261261

262-
1. If the previously mentioned error occurs, take the following steps:
262+
1. Open a terminal instance and run the command `wsl`.
263263

264-
1. Open a terminal instance and run the command `wsl`.
265-
266-
1. Wait for at least five minutes before rerunning the health check.
267-
268-
1. The `healthcheck.exe` command might show the output, "Waiting for Telemetry. Please retry in five minutes."
264+
2. Wait for at least five minutes before rerunning the health check.
269265

270-
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check-telemetry.png" alt-text="Screenshot showing health telemetry status." lightbox="media/mdeplugin-wsl/wsl-health-check-telemetry.png":::
271-
272-
If that error occurs, wait for five minutes and rerun `healthcheck.exe`.
266+
### The `healthcheck.exe` command might show the output, "Waiting for Telemetry. Please retry in five minutes."
267+
268+
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check-telemetry.png" alt-text="Screenshot showing health telemetry status." lightbox="media/mdeplugin-wsl/wsl-health-check-telemetry.png":::
273269

274-
1. If you don't see any devices in the Microsoft Defender portal, or you don't see any events in the timeline, check the following things:
270+
If that error occurs, wait for five minutes and rerun `healthcheck.exe`.
271+
272+
### You don't see any devices in the Microsoft Defender portal, or you don't see any events in the timeline
273+
274+
Check the following things:
275275

276-
- If you aren't seeing a machine object, make sure sufficient time has passed for onboarding to complete (typically up to 10 minutes).
276+
- If you aren't seeing a machine object, make sure sufficient time has passed for onboarding to complete (typically up to 10 minutes).
277277

278-
- Make sure to use the right filters, and that you have the appropriate permissions assigned to view all device objects. (For example, is your account/group is restricted to a specific group?)
278+
- Make sure to use the right filters, and that you have the appropriate permissions assigned to view all device objects. (For example, is your account/group is restricted to a specific group?)
279279

280-
- Use the health check tool to provide an overview of overall plug-in health. Open Terminal, and run the `healthcheck.exe` tool from `%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools`.
280+
- Use the health check tool to provide an overview of overall plug-in health. Open Terminal, and run the `healthcheck.exe` tool from `%ProgramFiles%\Microsoft Defender for Endpoint plug-in for WSL\tools`.
281281

282-
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check-support.png" alt-text="Screenshot showing status in PowerShell." lightbox="media/mdeplugin-wsl/wsl-health-check-support.png":::
282+
:::image type="content" source="media/mdeplugin-wsl/wsl-health-check-support.png" alt-text="Screenshot showing status in PowerShell." lightbox="media/mdeplugin-wsl/wsl-health-check-support.png":::
283283

284-
- Enable the connectivity test and check for Defender for Endpoint connectivity in WSL. If the connectivity test fails, provide the output of the health check tool to our support team.
284+
- Enable the connectivity test and check for Defender for Endpoint connectivity in WSL. If the connectivity test fails, provide the output of the health check tool to our support team.
285285

286-
- If the connectivity test reports "invalid" in health check:
287-
288-
- If your machine has a proxy setup, run the command `healthCheck --extendedProxy`. This will provide information on which proxy(s) is set on your machine and whether these configurations are invalid for WSL defender.
289-
290-
291-
![Extend HealthCheck Proxy doc](media/mde-plugin-wsl/extend-healthcheck-proxy-doc.png)
286+
### Connectivity test reports "invalid" in health check
287+
288+
- If your machine has a proxy setup, run the command `healthCheck --extendedProxy`. This will provide information on which proxy(s) is set on your machine and whether these configurations are invalid for WSL defender.
289+
290+
![Extend HealthCheck Proxy doc](media/mde-plugin-wsl/extend-healthcheck-proxy-doc.png)
292291

293-
- If the steps mentioned above do not fix the problem, include the following configuration settings in the `.wslconfig` located in your `%UserProfile%` and restart WSL. Details about settings can be found in [WSL Settings](/windows/wsl/wsl-config#main-wsl-settings).
292+
- If the steps mentioned above do not fix the problem, include the following configuration settings in the `.wslconfig` located in your `%UserProfile%` and restart WSL. Details about settings can be found in [WSL Settings](/windows/wsl/wsl-config#main-wsl-settings).
294293

294+
**In Windows 11**
295295

296-
```
297-
- In Windows 11
296+
```
298297
299-
```bash
300-
# Settings apply across all Linux distros running on WSL 2
301-
[wsl2]
298+
# Settings apply across all Linux distros running on WSL 2
299+
[wsl2]
302300
303-
dnsTunneling=true
301+
dnsTunneling=true
304302
305-
networkingMode=mirrored
306-
```
303+
networkingMode=mirrored
304+
```
307305

308-
- In Windows 10
306+
**In Windows 10**
309307

310-
```bash
311-
# Settings apply across all Linux distros running on WSL 2
312-
[wsl2]
308+
```bash
309+
# Settings apply across all Linux distros running on WSL 2
310+
[wsl2]
311+
312+
dnsProxy=false
313+
314+
```
313315

314-
dnsProxy=false
315-
```
316-
``` - If the connectivity issues persist, run the following steps to collect the networking logs
316+
### Connectivity issues persist
317317

318-
1. Open an elevated(admin) PowerShell prompt
319-
320-
2. Download and Run: `.\collect-networking-logs.ps1`
318+
Collect the networking logs by following these steps:
321319

322-
```powershell
323-
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-networking-logs.ps1" -OutFile collect-networking-logs.ps1
324-
Set-ExecutionPolicy Bypass -Scope Process -Force
325-
.\collect-networking-logs.ps1
326-
```
320+
1. Open an elevated(admin) PowerShell prompt.
321+
322+
2. Download and Run: `.\collect-networking-logs.ps1`
323+
324+
```powershell
325+
326+
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-networking-logs.ps1" -OutFile collect-networking-logs.ps1
327+
Set-ExecutionPolicy Bypass -Scope Process -Force
328+
.\collect-networking-logs.ps1
329+
330+
```
327331

328-
3. Open a new command prompt and run: `wsl`
332+
3. Open a new command prompt and run: `wsl`
329333

330-
4. Open an elevated(admin) command prompt and run: `wsl --debug-shell`
334+
4. Open an elevated(admin) command prompt and run: `wsl --debug-shell`
331335

332-
5. In debug shell, run: `mdatp connectivity test`
336+
5. In debug shell, run: `mdatp connectivity test`
333337

334-
6. Allow the connectivity test to be completed
338+
6. Allow the connectivity test to be completed
335339

336-
7. Stop the .ps1 ran in step #2
340+
7. Stop the .ps1 ran in step #2
337341

338-
8. Share the generated .zip file along with support bundle that can be collected as mentioned in [steps](#support-bundle-collection).
342+
8. Share the generated .zip file along with support bundle that can be collected as mentioned in [steps](#support-bundle-collection).
339343

340344
### Support bundle collection
341345

0 commit comments

Comments
 (0)