Solved

"network restart" equivalent in Windows OR: Auto-Restart network adapter if ping fails

Posted on 2004-04-06
2
1,318 Views
Last Modified: 2013-11-09
Hi,

some of our computers don't get the network configuration right after an automatic reboot at night. What we typically do to fix this problem is - of course - to either reboot the computer or "reboot" the network connection (In Network Neighbourhood right click on connection, disconnect and connect again).

Is there a way to automate this ?

Basically I want to do the following using Windows Scripting Host:

After reboot (in Autostart):
- ping a set of other computers
- if more than one remote computer cannot be pinged, the local computer probably does not have a network connection
- in this case disconnect and connect the network adapter

I think I can do the pinging part using VBScript (http://www.microsoft.com/technet/community/scriptcenter/network/scrnet04.mspx), but I am not sure about how to restart a network adapter - I'm missing something like the "/etc/init.d/network restart" from linux.

Any ideas ? Thanks in advance !
Holsche
0
Comment
Question by:Holsche
2 Comments
 

Accepted Solution

by:
Derek_Neuberger earned 125 total points
ID: 10775348
If this is an automatic reboot, I am assuming that it occurs at the same time each night... This being the case it might be easier to set up a batch file on each machine (depending on network configuration, should be able to implement remotely) to force it to renew its network settings.  For example:

In Windows 2000
________________
@echo off
ipconfig /release *
ipconfig /renew *
________________

You could then set this batch file to run at the appropriate time interval on each individual machine.

Remember that the syntax of the ipconfig switches can change from one operating system version to another; so if you have a heavily mixed network, this might not be the best solution.

Hope this helps,
Derek
0
 

Author Comment

by:Holsche
ID: 10790275
Thanks, I'll try that
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now