4 Haziran 2020 Perşembe

Windows Zaman Damgali ping Bağlantı Testi / Windows Time Stamp ping Connection Test


WindowsPowerShell:
seçenek 1 / Option 1
 ping.exe -t COMPUTERNAME|Foreach{"{0} - {1}" -f (Get-Date),$_}  veya
 ping.exe -t 10.227.23.241 |Foreach{"{0} - {1}" -f (Get-Date),$_} >> Ping_IP.txt
seçenek 2 / Option 2
 Test-Connection -Count 9999 -ComputerName COMPUTERNAME | Format-Table @{Name='TimeStamp';Expression={Get-Date}},Address,ProtocolAddress,ResponseTime
 ping 10.0.0.1 | while read line; do echo `date` - $line; done
 @echo off

set /p host=host Address: 
set logfile=Log_%host%.log

echo Target Host = %host% >%logfile%
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do (
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile%
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A
    timeout 1 >NUL 
    GOTO Ping)
Share:

Blog Arşivi