Facebook
From tfuuyruyr, 1 Month ago, written in Plain Text.
This paste is a reply to Untitled from uetj - view diff
Embed
Download Paste or View Raw
Hits: 147
  1. # Création du filtre
  2. pktmon filter add MyPing -i 192.168.1.254 -t ICMP
  3.  
  4. # Démarrage de la capture
  5. pktmon start -c
  6.  
  7. # Attendre un moment pour la capture
  8. Start-Sleep -Seconds 10
  9.  
  10. # Arrêt de la capture et création du fichier PktMon.etl
  11. pktmon stop
  12.  
  13. # Convertir le fichier .etl en .txt (si disponible)
  14. if (Test-Path "$env:systemroot\system32\pktmon.exe") {
  15.  pktmon etl2txt C:\WINDOWS\system32\PktMon.etl
  16. } else {
  17.  # Ancienne version de pktmon, utiliser une autre méthode pour convertir en .txt
  18.  pktmon format .\PktMon.etl -o ResultatCapture.txt
  19. }
  20.  
  21. # Déchargement de pktmon
  22. pktmon unload