Windows – command for enabling/disabling local area connection

networkingwindows

for some reason, when a machine of mine first starts up from a fresh boot, the network doesn't work properly. I usually fix this by enabling and disabling the 'local area connection'. These are the steps that I take to do the enabling and disabling:

  1. control panel
  2. View network connections
  3. Right click 'local area connection', select 'disable'.
  4. Right click 'local area connection', select 'enable'.

This fixes the problem, but I'm looking for a faster way to do it: is their a command that I can run from cmd.exe to perform the same action?

Best Answer

netsh interface set interface "Local Area Connection" DISABLE
netsh interface set interface "Local Area Connection" ENABLE

Syntax may depend and vary a bit between different versions of Windows...