Link to home
Start Free TrialLog in
Avatar of rustyrpage
rustyrpage

asked on

Restart NIC automatically

I have a problem on my email server that I cannot figure out the issue...until I figure out the issue, I have found that restarting the NIC (enable/disable, plug/unplug etc) seems to fix the problem for a half hour or so.  Does anyone know of a way to have Windows scheduler run a script or something that will restart the NIC (or TCP/IP)

Thanks
Avatar of Jay_Jay70
Jay_Jay70
Flag of Australia image

you can use the devcon utility from ms

http://support.microsoft.com/kb/q311272/
Avatar of rustyrpage
rustyrpage

ASKER

I do not want to actually reboot the whole server...just the network interface.  I do not even know what service that is.  I need to be able to do it as a restart so that I do not have to go to the server console to restart.
i know, thats why i suggested devcon :) i havent scripted it before, but have noticed mentioned in a couple of threads, thought it might help, its just a command line sub for device manager
I would need an idea of how to do it since I don't see any easy way.
aight give me some time and ill see if i can put it in a script for you
Try
The keys in the registry are located in the following location -

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}

Under here you will have many other sub-keys for your network adapters (onboard/wireless/bluetooth etc) theyt are named 0000, 0001, 0002 etc

Unfortunately, each NIC will have it's Network Speed and Duple mode referenced in a different way so you will have to chack each model. E.g On a Dell GX260 they are "Duplexmode"="FullDuplex" and "MediaSelect"="100BASETX", other Dell's are "SpeedDuplex"="4".

Most machines will need a reboot to make the change.

Good luck.
you can use the Windows Support Tool devcon (Device Console) to enable or disable devices (such as the NIC).

Example to disable the VMWare NIC:
devcon disable *VMNetAdapter1

you must provide the Hardware-ID which can be found in the device manager (devmgmt.msc) under the properies - details - Hardware-IDs of the network card.

ATB
Markus
ASKER CERTIFIED SOLUTION
Avatar of myron-szy
myron-szy
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the the grade A rating.  Which solution did you implement?  A server restart early in the morning or a different NIC?