How to track a long term network issue?

1. Open Power Shell

2. copy and paste the following command
PS> Start-Transcript -path C:/Script/PingLog.txt -Append
-The Append flag is telling it to continue on if the file already exists, this isn’t necessary, and depends on how you would like to name/use the file.

 

3. Copy and paste the following command
Ping.exe -t google.com | ForEach {“{0} – {1}” -f (Get-Date),$_}

Ping.exe – powershell can use your CMD stuff just fine.
-t – a continuous ping. can go before or after our hostname/IP address.

google.com is what we’re pinging.

Next up is a pipe (|) – you’re sending information over to our next command.

Foreach is the next command.

[{0} – {1} -f] – This is the text formatting, check the references below if you’d like to learn more

(Get-Date) – is the date to date. it’s also what’s going into {0} in the text formatting above.

$_ – This is you taking your previous input from ping and putting into {1}

4. Then go to C: select Script folder and open PingLog.txt you should see your text file that’s recording your pings.

Leave a Reply

Your email address will not be published. Required fields are marked *