TCP/IP stack reset to default value Windows 10

I encountered a strange issue with windows 10 not connecting to wired or wireless networks and based on the description from the user had them send their laptop in for further review.  Each adapter was in an identifying state and I later learned at a 169.245.x.x IP address.  At first, I assumed hardware issues as both the wireless and wired adapter weren’t working (although I guess they would be on separate chips?).  I suppose if I had given it more thought I might have thought what do both share…the TCP/IP stack.  And that was exactly what I needed to do to fix it.  So just in case someone is struggling with this issue follow the below.  I can’t take credit for this fix though as I found the answer at http://www.sysprobs.com/fixed-windows-10-limited-connectivity-not-getting-ip-from-dhcp.

  1. Run command prompt as administrator.
  2. netsh winsock reset catalog
    netsh int ipv4 reset reset.log
  3. Restart PC

Shutting off WiFi when connected to a wired connection

In the company I work for we commonly have laptops that are connected to a wired connection and are also connected to WiFi.  This isn’t good practice and DNS gets a little weird when it gets registered IP addresses from both the WiFi adapter and a registration from the wired connection.  I have been using a VB script from intelliadmin that monitors the wired connection and disables the WiFi adapter when the wired connection is plugged in which works great.  You can do as intelliadmin suggests and run it as a group policy computer configuration logon script.  The problem that I ran into with that method is that as group policy runs when a computer starts up if it’s not connected to the network the script wouldn’t run.  Even worse I ran into issues where the user would have their computer connected to a wired connection and shut it off with the wireless connection still disabled. If the user booted up off-network they would call in complaining they had no WiFi.  The solution was to copy intelliadmins vb script local and run as a scheduled task on the local machine.

  1. Use the below batch script to copy the file somewhere local on the machine.  Set this up as a computer startup script via GPO.
xcopy \\domain.com\sysvol\startupscriptgpolocation\netswitch.vbs "%ALLUSERSPROFILE%\scripts\" /D

2. Then setup a scheduled task up via group policy to run the script as system with the
action setup as start a program with the program/script (If you need help see this                    TechNet article) “%ALLUSERSPROFILE%\scripts\netswitch.vbs” and your parameters          (i.e.  “Local Area Connection” “Wireless Connection”).

Now whether your users are off-network or on-network, they will only use the WiFi adapter when an Ethernet Connection is unavailable.