title: How to get and use network adapter name?
body: <p>I am working with the following script:</p>
  
  <pre><code>@echo off
  netsh interface show interface | find "Connected"
  if errorlevel 1 goto #
  netsh interface set interface "Local Area Connection" disabled
  goto end
  :#
  netsh interface set interface "Local Area Connection" enabled
  :end
  </code></pre>
  
  <p>I am trying to find a way to get the name of the found network adapters and use the name(s) instead of <code>"Local Area Connection"</code>. The reason is that not everyone's adapters are named the same and I am trying to automate this task as much as possible.</p>
  
  <p>How can I get the names of the found network adapters and use the name(s)?</p>