-
-
Save tonyyates/8e10ae9040ad238aa90e781cf022f3da to your computer and use it in GitHub Desktop.
PowerShell Script select only the first MAC address, append a timestamp and append to a file every 5 seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerShell Script select only the first MAC address, append a timestamp | |
# and append to a file every 5 seconds | |
while (1) | |
{ | |
$arpTable = $(arp -a) | select -Skip 3 | Select -first 1 | |
$arpTable = $arpTable + $(Get-Date) | |
Out-File -Append -FilePath .\captured-mac.txt -InputObject $arpTable | |
Start-Sleep -Seconds 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment