Skip to content

Instantly share code, notes, and snippets.

@daurrutia
Created March 10, 2017 02:36
Show Gist options
  • Save daurrutia/d1aa7d333036621f7ddd643a3727c50b to your computer and use it in GitHub Desktop.
Save daurrutia/d1aa7d333036621f7ddd643a3727c50b to your computer and use it in GitHub Desktop.
Capture-Packets
# CapturePackets.ps1
# TShark.exe must be installed on the target computer. TShark is part of the Wireshark installation.
# Author: David U. | Operations
$capFile = "Capture-" + (Get-Date -Format yyyyMMddHHmm) + ".pcap"
&"C:\Program Files\Wireshark\tshark.exe" -a filesize:32000 -w "$capfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment