Capture a network packet trace on Windows with netsh trace
Start an ETL packet capture with the built-in netsh trace context — the lightweight alternative to installing Wireshark on servers.
01Command
$ netsh trace start capture=yes tracefile=C:\temp\nettrace.etl maxsize=51202What it does
netsh trace has shipped with Windows since Server 2008 yet is almost never remembered when a capture is needed. Besides raw packets (capture=yes), it can trace provider scenarios (e.g. scenario=Connectivity) and emits a CAB with correlated logs on stop. Open the resulting .etl in Microsoft Network Monitor or convert it with etl2pcapng for Wireshark.
03Risk
04Undo
$ netsh trace stop05Sources
- netsh trace | Microsoft LearnEvidence: Microsoft documents 'netsh trace start' with capture=yes and tracefile parameters to begin a packet capture, and 'netsh trace stop' to end it and correlate the logs.
- NETSH - Windows CMDEvidence: SS64 documents the netsh trace context, including scenario-based tracing and capture options.
Last verified: 2026-09-17 · Category: Network
06Related solutions
Purge cached DNS lookups so Windows re-resolves hostnames from scratch — the fix for 'the new server is live but my browser still hits the old one'.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.
Display the IP-to-MAC address cache Windows built by talking to neighbors — a quick way to spot which devices are on your subnet.