Windows 10: Remove Networks Associated With Disconnected Network Cards?

Discussion in 'Operating Systems' started by Zarathustra[H], May 12, 2019.

  1. Zarathustra[H]

    Zarathustra[H] Official Forum Curmudgeon

    Messages:
    27,667
    Joined:
    Oct 29, 2000
    Hey all,

    So, I apologize if this is a silly question, but I don't spend that much time in Windows anymore, and this one has me a little stumped. I have googled, but not yet found a solution.

    I have a 10Gig adapter in my desktop for a direct connection to my NAS. I have switched out the adapter for a newer/better one a couple of times now, but every time I do, windows seems to remember the old device somewhere and the ghost of that device is causing me trouble.

    upload_2019-5-12_0-40-30.png

    So, there is a network associated with an old Q-Logic / Brocade fiber adapter I used two NIC's ago that is hogging the IP address I want to use for my new fiber adapter.

    It's not listed along with the active networks, so I can't delete it there.

    Does anyone know how I can find it and kill it?

    I've enabled viewing hidden devices in device manager, and gone through the entire list, and the QLogic (Brocade) controller is no longer in there anywhere. There has to be a way to list these hidden network connections so you can remove them.

    I'd appreciate any ideas.
     
    Last edited: May 12, 2019
  2. pendragon1

    pendragon1 [H]ardForum Junkie

    Messages:
    12,092
    Joined:
    Oct 7, 2000
    put that card back in, remove that ip(set to auto) reboot then shutdown and swap cards. or dig through the registry, look for that ip or card and remove it.
     
  3. bigdogchris

    bigdogchris [H]ard as it Gets

    Messages:
    17,787
    Joined:
    Feb 19, 2008
  4. Zarathustra[H]

    Zarathustra[H] Official Forum Curmudgeon

    Messages:
    27,667
    Joined:
    Oct 29, 2000
  5. Zarathustra[H]

    Zarathustra[H] Official Forum Curmudgeon

    Messages:
    27,667
    Joined:
    Oct 29, 2000
  6. Biznatch

    Biznatch 2[H]4U

    Messages:
    2,195
    Joined:
    Nov 16, 2009
    It's been a LONG time since I've dealt with orphaned NICs from cloning a VM, but I know it's possible to delete them. Since then I've moved to a devops role and focus heavily on scripting, so my first choice is always powershell since it is ridiculously powerful and can do basically anything to a windows box. That link was from a very quick search, and I'd only do registry changes as a last resort. There should be some kind of function to list all network adapters with a filter for inactive/detached devices that you can pipe to the delete nic function. I'd be surprised if this can't be done with a single line of powershell.


    *edit* Does this return that NIC in the list?
    Get-NetAdapter -Name "*" -IncludeHidden | ? { $_.Status -ne 'Up' }

    This should fix your binding issue, but won't delete the adapter itself (This will not perform any action unless you remove the -whatif flag)
    Get-NetAdapter -Name "QLogic BR-series 10G Ethernet Adapter" -IncludeHidden | get-netipaddress | remove-netipaddress -whatif
     
    Last edited: May 15, 2019
    Zarathustra[H] likes this.
  7. Zarathustra[H]

    Zarathustra[H] Official Forum Curmudgeon

    Messages:
    27,667
    Joined:
    Oct 29, 2000

    Thank you. I really appreciate the help!


    Damn, I'm not one of those people who suffer from irrational console fear. In fact I spend hours in the Linux console daily.

    That PowerShell syntax - however - looks completely foreign.

    Going to have to look into this when I get home.
     
  8. Biznatch

    Biznatch 2[H]4U

    Messages:
    2,195
    Joined:
    Nov 16, 2009

    Yes, powershell scripting syntex is needlessly long. It's a good thing it's so powerful... My favorite is how they default map 'h' to history, but you can't bang(!) repeat, you have to invoke-history....... It makes more sense to developers used to writing .net code.

    But I still can't read bash very well. If I had to write a non-windows specific script I just write it in python.
     
  9. Tawnos

    Tawnos 2[H]4U

    Messages:
    3,805
    Joined:
    Sep 9, 2001
    It looks foreign when you first start, but there's a pattern to it. Powershell commands are supposed to follow Verb-Noun syntax and parameters are always prefixed with hyphen. Aliases are available for common commands, and tab completion is available for almost everything. Common shortcut syntax you may see are % and ?, which mean "foreach" and "where", respectively.

    Instead of data being piped from command to command being strings, the data is passed as objects with their relevant properties, methods, etc. Various parts of the windows system appear as drives, you can list them using Get-PSDrive. This lets you directly access things like the registry using commands like cd HKCU: or ls Env: