Is there a way to change the network adapter name in batch or powershell script? possibly by specifying a connection number ?
Thanks in advance.
Easy enough without PowerShell:
netsh interface set interface name="Old Name" newname="New Name"
Easy enough with PowerShell:
Get-NetAdapter -Name "Old Name" | Rename-NetAdapter -NewName "New Name"
Of course, in PS, you can also select your adapter by whatever property you see fit.
Get-NetAdapter -InterfaceIndex 12 | Rename-NetAdapter -NewName "New Name"
Swiped from Technet Blogs, which has a couple of other more complicated ways.
$PSVersionTable.PSVersion
4.0.-1,-1
Get-NetAdapter: The term 'get-netadapter' is not recognized [...]
netsh
or WMI (see the linked technet blogs article) should work.
Apr 3, 2014 at 20:39