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),$_}

$timestamp = Get-Date -Format "yyyyMMdd"

ping.exe -t gatewayx.us.ecp.ensono.com | Foreach{"{0} - {1}" -f (Get-Date),$_} >$env:COMPUTERNAME$timestamp.TXT

Comments

Popular posts from this blog

Troubleshooting Netlogon Error Codes

Service Principal Names (SPNs) SetSPN Syntax (Setspn.exe)

Troubleshooting AD Active Directory Replication Error 8456 or 8457: "The source | destination server is currently rejecting replication requests"