title: IPCONFIG find ETHERNET ADAPTER working, how do I find Wi-Fi adapter?
body: <p>I found a script that changes my DNS addresses, but I can only get it to work on my ethernet adapter. How would I go about changing this on my wireless adapter?</p>
  
  <pre><code> SET adapterName=
   FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "ETHERNET ADAPTER"') DO (
    SET adapterName=%%a
    SET adapterName=!adapterName:~17!
    SET adapterName=!adapterName:~0,-1!
    netsh interface ipv4 set dns name="!adapterName!" static 172.16.0.1 primary
    netsh interface ipv4 add dns name="!adapterName!" 172.16.0.2 index=2
   )
  </code></pre>
  
  <p>The above works for changing ethernet. I've tried the following for wireless with no luck,</p>
  
  <pre><code> FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "WIRELESS LAN ADAPTER"') DO (
  </code></pre>