NETSH TRACE packet capture ONLY

DaveC 186 Reputation points
2021-05-19T21:48:34.09+00:00

I'd like to know if it's ever been considered to add an option to NETSH TRACE CAPTURE=YES which prevents the utility from gathering additional data (and creating cabinet files)?

In other words - how about an option to only get a network capture?

Thanks,
DaveC

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | Other
{count} vote

Accepted answer
  1. Anonymous
    2021-05-20T02:00:44.003+00:00

    Hi ,

    Use following netsh command, it can only generate ETL.file: netsh trace start capture=yes persistent=yes tracefile=c:\nettrace.etl maxsize=2048 overwrite=yes report=disabled

    Best Regards,
    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Gary Nebbett 6,216 Reputation points
    2021-05-20T07:01:39.407+00:00

    Hello @DaveC ,

    I guess that you might have already tried Candy's suggestion ("report=disabled") and found that it did not work. It is a few years since I last looked, but when I investigated this behaviour it seemed as though "report=disabled" was ignored if the user was a member of the Administrators group.

    At that time, I switched to using PowerShell to capture packets - the Add-NetEventPacketCaptureProvider uses exactly the same capture mechanism as "netsh trace" (i.e. ndiscap.sys) but without the wasteful report generation.

    There is now a new packet capture mechanism available from the command line (in newer versions of Windows 10 - since 1809, I think) - namely PktMon. This can do everything (and more) that ndiscap.sys does and I have now switched to using it.

    Gary

    2 people found this answer helpful.

  2. DaveC 186 Reputation points
    2021-05-20T17:02:38.89+00:00

    Thank you @Anonymous and @Gary Nebbett for these suggestions. I'll review and follow up.

    -DaveC


  3. DaveC 186 Reputation points
    2021-05-27T13:50:14.9+00:00

    Apologies @Anonymous and @Gary Nebbett for my delay.

    I wish I could accept BOTH of these answers, because they are both very helpful :)

    We successfully tested both NETSH (with 'report=disabled' switch) AND pktmon. Seems like PKTMON is the way forward :)

    Thank you both very much.

    -DaveC


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.