Friday, April 12, 2013

Reset NIC in Win7

I posted this because sometimes the NIC/LAN card does not work out of the box. The problem that I encountered is that Win7 says that there are no Internet connection on the network, though all are fine.
After a restart (disable and enable) of the NIC the Internet starts working.

I would like to do this automatically so I created a batch file and I name it "lanreset.bat". Below are the contents...

@echo off
wmic path win32_networkadapter where NetConnectionID="LAN" call disable
wmic path win32_networkadapter where NetConnectionID="LAN" call enable


Just replace the blue colored text with the name of the NIC.
Put it in the Task Scheduler where it would run in on startup so that it would execute.