Accidentally added more NetAdapters?

So I’m attempting to set a network adapter name and IP address all in one go (bad idea, should just do in 2 steps) and it seems to be adding more network adapters.

I can’t seem to query them, but I know they exist because they’re using the name and IP address.

How can I delete them or prevent them from spawning when I use my normal command to test (I need to set it programmatically for another set of machines)?

These are the command I’m using (now)(feedback is welcome):

$netAdapter = Get-NetAdapter | Select Name, ifIndex | Where {$_.Name -Match "Vritual"} | 

New-NetIPAddress -IPAddress “10.13.42.1” -PrefixLength 24 <— This does not work anymore as its “taken”

Get-NetAdapter | Where {$_.Name -Match "Renamed"} | Rename-NetAdapter -NewName DSP 

Previously, I tried to combine them and this is where I’m at now.

submitted by /u/FullPoet
[link] [comments]

Leave a Reply