How to UNINSTALL an ethernet adapter using CMD (Batch file)

RyanDandelion 0 Reputation points
2023-02-15T19:51:34.5133333+00:00

I am attempting to drum up some batch files specifically to automate network troubleshooting at my job. I'm relatively new to "complex" CMD commands, and have been looking into a way to uninstall an ethernet adapter off a system using a CMD command. I've seen other forums make mention of DevCon and some 3rd party middleware, but I'm trying to do this with as little input and administrative overhead as humanly possible, since this automation is intended to be used by customers whose systems we cannot remote into (due to internet connectivity issues). Can a scripting expert please point me in the right direction?

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,751 Reputation points
    2023-02-16T12:03:06.5733333+00:00

    Hello there,

    If you are not planning on automation am simple CMD might come handy.

    Open CMD as admin

    -Now, if you're trying to remove an Ethernet (wired) connection, input: netsh lan show profiles

    -But, if you're trying to remove a Wi-Fi (wireless) connection, input: netsh wlan show profiles

    -Find the network adapter you want to remove from the list and make a note of the interface name found at the top of each profile.

    -Next, input the following command to remove a wired network adapter interface: netsh lan delete profile interface="InterfaceName"

    Or, input the following command to remove a wireless network adapter interface: netsh wlan delete profile interface="InterfaceName"

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.