POWERSHELL PING CMD with date and time
CMD to run with date for PING CMD
ping.exe -t COMPUTER-NAME | Foreach{"{0} - {1}" -f (Get-Date),$_}
ping.exe -t COMPUTER-NAME | Foreach{"{0} - {1}" -f (Get-Date),$_}
$timestamp = Get-Date -Format "yyyyMMdd"
ping.exe -t gatewayx.us.ecp.ensono.com | Foreach{"{0} - {1}" -f (Get-Date),$_} >$env:COMPUTERNAME$timestamp.TXT
Comments
Post a Comment