Add warning to collect-wsl-logs.ps1 to be displayed when tool is missing#14447
Add warning to collect-wsl-logs.ps1 to be displayed when tool is missing#14447andremueiot wants to merge 5 commits intomicrosoft:masterfrom
Conversation
On executing the log collection script, it will first confirm the required tools tcpdump and iptables are installed. For each tool missing a warning is displayed, reminding the user that the tool should be installed prior to executing the script to get a more complete log collection.
…om/andremueiot/WSL_1 into user/andremueiot/warn_tool_missing
There was a problem hiding this comment.
Pull request overview
Adds pre-flight warnings to the Windows-side diagnostics/collect-wsl-logs.ps1 script to inform users (when running the networking log profile) that certain Linux tools should be installed in WSL for more complete log capture.
Changes:
- Introduces
Test-WslApplicationto probe for required tools inside WSL and emitWrite-Warningwhen missing. - Calls the new check for
tcpdumpandiptableswhen-LogProfile networkingis selected.
You can also share your feedback on Copilot code review. Take the survey.
… WSL might be unavailable
There was a problem hiding this comment.
Pull request overview
Adds preflight checks to the WSL log collection workflow so the networking profile warns users when key in-WSL tools are missing, helping avoid incomplete diagnostics for networking issues.
Changes:
- Introduce
Test-WslApplicationto probe for tool presence inside WSL viacommand -v. - Emit warnings for missing
tcpdump/iptableswhen-LogProfile networkingis selected.
You can also share your feedback on Copilot code review. Take the survey.
keith-horton
left a comment
There was a problem hiding this comment.
@benhillis , what would be the process to ingest this change?
Summary of the Pull Request
On executing the log collection script, it will first confirm the required tools
tcpdumpandiptablesare installed. For each toolmissing a warning is displayed, reminding the user that the tool should be installed prior to executing the script to get a more
complete log collection.
PR Checklist
Validation Steps Performed
Ran the command below (from log collection instructions) manually in both scenarios where tools are installed and not installed.
Visually confirmed that both warning messages show up when the respective tool is not installed.
.\collect-wsl-logs.ps1 -LogProfile networking