How can I print out contents of cmd window?

I am having connectivity issues with one of our servers. I would like to open a cmd  window and ping ther server, then release and renew the IP and then ping the server again.  I know how to do all that- what I don't know how to do is how I can save those results to a text file so I can send them to someone else via email.  Any way to do that?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Toni UranjekConnect With a Mentor Consultant/TrainerCommented:
Right click in command prompt, select Mark, mark text, press Enter key (copy), go to notepad and paste.
Ashish PatelCommented:
to get the output to a file we use redirecting in dos, but then you will not be able to look the results in the cmd window, you will have to check the file always. like this

ping >> output.txt
Ashish PatelCommented:
or something like this

ping -t >> output.txt

and to see the current results open another cmd window and go to the path where you have your output.txt being created and use type command like below

type output.txt

All Courses

From novice to tech pro — start learning today.