Capture a Network Trace in Windows without installing Wireshark
You can capture a network trace in Windows without installing Wireshark by using the built-in netsh
command. Here’s how you can do it:
- Open an Elevated Command Prompt:
- Press
Win + X
and select “Command Prompt (Admin)” or “Windows PowerShell (Admin)”.
- Press
- Start the Network Trace:
- Run the following command:
netsh trace start persistent=yes capture=yes filemode=circular report=disabled tracefile=C:\temp\nettrace.etl
Make sure the
C:\temp
directory exists or choose another location.
- Run the following command:
- Reproduce the Issue:
- Perform the actions that you want to capture in the network trace.
- Stop the Network Trace:
- Run the following command to stop the trace:
netsh trace stop
- Run the following command to stop the trace:
- Convert the etl Trace to pcapng:
- The trace will be saved as an
.etl
file in the specified location. You can convert this file to a format readable by Wireshark usingEtl2Pcapng
https://github.com/microsoft/etl2pcapng - Open Command Prompt and navigate to the directory where etl2pcapng is installed
- Run
etl2pcapng.exe nettrace.etl nettrace.pcapng
- The trace will be saved as an
- View the Trace
- Open WireShark
- Go to File > Open and select the newly converted .pcapng file
This method works on Windows 7/2008 R2 and above.