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 SCEP certificate profile deployment to Android devices in Microsoft Intune