Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Networking, Scripts

Windows Network Troubleshooting Script

Submitted by on January 20, 2010 – 10:15 pm 8 Comments

I try my best to stay away from Windows. I wish my clients did the same. The usual difficulty of troubleshooting elusive network performance problems is amplified many-fold when there is a Windows computer at the end of the line. With Unix it’s relatively simple: run tests “a”, “b”, “c”, etc and follow the familiar process of elimination. With Windows in the picture the number of steps uses up all of the English alphabet and spills over well into the Russian one. And when you finally reach step “я”, you have to pull out your Chinese dictionary.

Below is a simple but, as I found time and time again over the past few years, and extremely useful little batch script that collects important network performance information on the affected Windows system. The script does not require admin privileges and doesn’t make any changes to the system. Any Windows user can run it and send you the output. The information the script collects would help you quickly catch many common Windows networking issues.


@Echo OFF

for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set timestr=%d:~6,4%%d:~3,2%%d:~0,2%%t:~0,2%%t:~3,2%

set OUTFILE=C:Usernetprobe_%timestr%.txt

echo ---------------------------------------------------------  > %OUTFILE%
echo Email contents of this file to >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

hostname >> %OUTFILE%
date /T  >> %OUTFILE%
time /T  >> %OUTFILE%

echo --------------------------------------------------------- >> %OUTFILE%
echo IPCONFIG                                                  >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

ipconfig /All >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

echo --------------------------------------------------------- >> %OUTFILE%
echo PING                                                      >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

set TARGET=hostname_or_ip_of_target_server
ping -w 1000 -n 10 -l 512 %TARGET% >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

echo --------------------------------------------------------- >> %OUTFILE%
echo TRACERT                                                   >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

tracert -w 512 %TARGET% >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%

echo --------------------------------------------------------- >> %OUTFILE%
echo NETSTAT                                                   >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -a     >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -e     >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -p TCP >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -p UDP >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -p IP  >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -r     >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -s     >> %OUTFILE%

echo --------------------------------------------------------- >> %OUTFILE%
notepad %OUTFILE%

Print Friendly, PDF & Email


  • laxman says:


    thanx That vary nice script. check it on my pc after making some change.

  • Neiss says:

    Really interesting and great written article! Thank you for that!

    Check out – You can’t find fresher Proxies!

  • soccermaster1 says:

    Ok so im a junior in high school, and im thinking about majoring in anything in IT (information technology). I love computers and electronics and everything in that field. I have a high passion in technology, absolutely love it. and my whole life i thought i was going to major in programming. but as i took two programming courses in high school, i found it very hard and challenging. And well my teacher didnt help very much either, i dont even think he knows how to program. he wasnt he best teacher to teach programming. But as i was trying to learn it frustrating. I kinda became sick of it, because i couldnt master it. and i usually am always good at figuring out how technology works. I know quite a bit more than the average person when it comes to computers and such. I took the programming classes when i was a sophomore in high school, and now im a junior. But now im looking at other majors in IT like networking. and im curious if networking is harder to learn than programming? I just want to know, because i dont want to waste my money majoring in something i cant learn. But im dedicated and determine to do it. Next year im going to be a senior so i kinda have to figure this stuff out. But does anyone know any careers/majors that dont require programming? I could easily major in something like nursing, or criminal justice. But i wouldnt be happy, i will never be happy/satisfied unless i have a career in the IT field, and one that makes good money. So if there is any one that is a computer geek like me, or work in the IT field please help me out! I just want to know some IT jobs that dont involve programming and arent super hard. Because im not a genious, but am pretty damn good with computers.

  • zigg3ns says:

    I was just wondering when using Linux through a wireless system if the packets can be sniffed like a windows system could?

  • isk8at818 says:

    Every time I turn off and on my computer running windows XP pro, my Windows system information says I have a different amount of ghz. Does anyone know what is wrong?

  • airdogspace2 says:

    ASP.NET, PHP, Ruby, Cold Fusion or Perl. Please state the advantages as well as the disadvantages and try to keep the responses limited to the languages mentioned. Thanks!

  • addmeonxbox360myuserisfallior says:

    My laptop, which runs windows 7, suddenly won’t run most websites i go to.

    I use Internet Explorer and when i go to type a new website into the URL, it will try to load forever (has the swirling blue circle).
    The only websites that have succesfully loaded are Google, Youtube, Yahoo, and pretty much only search engines. (right now im on my family computer). Im not to good with computers but could someone PLEASE help me out? I don’t think it’s a virus, but could it? or what’s going on?

  • llb443 says:

    I am Senior at a University Majoring in Information Systems (like an IT degree) and I have a question pertaining to IT Certifications. I have a fair amount of experience with computers. I worked at Best Buy as a Geek Squad Tech for 2 years, and have spent the last year doing Help Desk workstation troubleshooting for both the University and through an internship. I am wondering where I should start and how far I should go. If you need more information, email me. Thanks
    I am contemplating A+ and Network+, but after studying the A+, it is a lot of stuff that I already know. Is it worth the money for the cert?

Leave a Reply

%d bloggers like this: