0

I am trying to create a GPO that disables a laptop's wireless card whenever a Ethernet LAN is detected, and Enable the wireless whenever an Ethernet LAN is not detected.

Right now I have a GPO that works by disabling/enabling wireless when an Ethernet LAN is CONNECTED/DISCONNECTED. This only works for cases when the ethernet LAN is physically connected or disconnected, but not for cases when a computer starts up and no ethernet LAN is detected.

I would have to imagine there is an event that fires for after Windows Searches/tries to connect to an ethernet lan but fails because nothing is availible. I have looked through quite of lot of event viewer sources Wired-AutoConfig and NetworkProfile, none of these seem to have an event that handled ethernet LAN Detection.

I know that if you google this issue there are various proposed solutions: -Built in BIOS option (This does not work across the board for all of our laptops) -Various Powershell Scripts (many are lengthy and require manual customization) or do not work on Windows 7 devices properly.

Michael
  • 141
  • 4
  • can you explain why you want to do this, normally network cards are enabled on client machines. – Sum1sAdmin Apr 29 '16 at 16:06
  • @Rob-d Our network is only accessible via Ethernet connection or VPN, we do not broadcast it over WIFI. When both the Wireless Card and Ethernet Network cards are enable Windows produces inconsistent results with which network it chooses to default to. Of course, if the user is plugged into our Ethernet network we want it to default to the hardwired connection. There are ways to mess with the Windows Network Metrics associate with each network but they also are sometimes inconsistent. The most consistent and simplest way would be to disable wifi on a hardwired LAN and re-enable when off. – Michael Apr 29 '16 at 16:10
  • that's a routing problem, your VPN should give clients a DHCP address that doesn't conflict with your wifi. – Sum1sAdmin Apr 29 '16 at 16:24
  • @Rob-d there is no routing problem. There are no conflicts. Its simply our network vs all other networks. – Michael Apr 29 '16 at 16:26
  • if you are talking about your own wifi and LAN then that shouldn't be happening - if you are talking about remote networks I don't know how you hope to disable network cards. – Sum1sAdmin Apr 29 '16 at 16:34
  • Most network adapters usually log an event in the system event log when the card is connected to a switch, and again when it's disconnected. Have you looked for that? They are usually Informational events. I implemented exactly what you are (or are trying to) with EventSentry. When the NIC logged the event that it was connected to the Ethernet, EventSentry fired a script which disabled the WiFi adapter. This worked well, but I'm not sure if deploying a fairly comprehensive monitoring solution is economical for your scenario just to toggle network adapters. – Lucky Luke May 03 '16 at 23:55

0 Answers0