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 !