![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to rename enabled nics? I'm in desperate need of a script which allows me to rename the enabled nics... In my case Local Area Connection 5 (Network team) must be renamed to Public and 2 other active nics (member) should be renamed to Member #1 and Member #2. I thought the script was good to go but unfortunately the only thing missing is to write the new value into NetConnectionID.. Any help is greatly appreciated! Many thanks strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colNetAdapters = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapter where NetEnabled=TRUE") For Each objItem In colNetAdapters i = i + 1 If objItem.NetConnectionID = "Local Area Connection 5" Then objItem.NetConnectionID = "Public" Else If Left(objItem.NetConnectionID,5) = "Local" Then objItem.NetConnectionID = "Team Member #" & i End If End If Next -- // Freedom is a road seldom travelled by the multitude |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to rename enabled nics? WMI don't have a set method to change NetConnectionID documentation: http://msdn.microsoft.com/en-us/libr...16(VS.85).aspx NetConnectionID Data type: string Access type: Read/write Name of the network connection as it appears in the Network Connections Control Panel program. Windows Server 2003 and Windows XP: This property is read- only. Windows 2000 and Windows NT 4.0: This property is not available. Have you tried to find it in powershell ? or to change registry? http://windowsitpro.com/article/arti...-registry.html |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to set up 3 NICs on VPC? | Virtual PC | |||
| Script Must Be Enabled Error But It Is Enabled | Vista General | |||
| Rename errorin Vista - multiple file rename | Vista file management | |||
| 2 NICs | Vista networking & sharing | |||
| multiple NICs | Vista networking & sharing | |||