How to capture tcpdump on windows using script/service task

I have requirement to capture tcpdump on windows as am running Camunda (tomcat version) on windows. When i start a workflow, i need to capture tcpdump and When the workflow ends i need to stop tcpdump.

Please help

The windows version of tcpdump is called windump which uses the winpcap library to capture packets under windows. As far as I now these currently don’t support to capture localhost traffic on windows. So if you want to capture traffic where the client and server runs on the same system and communicates over local loopback devices you could try to use npcap in combination with wireshark. As I’m personally not a windows user have no experience with any of these setups.