SynopsisRenames network adapters on a local or remote computer.
- Rename-NetworkAdapter [-Name] [-NewName] [-ComputerName] [-Credential]
- Rename-NetworkAdapter [-MACAddress] [-NewName] [-ComputerName] [-Credential]
DescriptionThe Rename-NetworkAdapter cmdlet is used to rename the network adapters on a local or remote computer. Adapters can be identified by name or MAC address.
- Name The name of the network adapter to configure. This parameter cannot be used when the MACAddress parameter has been specified.
- MACAddress The name of the network adapter to configure. This parameter cannot be used when the MACAddress parameter has been specified.
- NewName Rename the network adapter to this name.
- ComputerName The computer against which to run the cmdlet. By default this parameter will be populated with the name of the local computer.
- Credential The credentials under which to run the cmdlet. By default this cmdlet will run as the current user. Using this parameter and the Get-PSCredential cmdlet you can specify an alternate set of credentials under which to execute this command.
InputsRename-NetworkAdapter accepts the output of Get-NetworkAdapter as an input object. In addition, the Name, MACAddress and ComputerName parameters each accept pipeline input by property name.
OutputsRename-NetworkAdapter makes changes directly to Windows and does not output any Powershell objects.
NotesThe Rename-NetworkAdapter cmdlet requires that the RPC service is started on the computer it is trying to access and that DNS services are available to resolve target host names.
Example 1This command will rename the network adapter 'Local Area Connection' on the local computer to 'NIC 1':
Rename-NetworkAdapter -Name "local area connection" -NewName "NIC 1"
Example 2This command will rename the network adapter with MAC address "00:0E:FF:49:08:DE" to 'NIC 2' on the remote computer PC01:
Rename-NetworkAdapter -MACAddress 00:0E:FF:49:08:DE -NewName "NIC 2" -Computer PC01
Example 3The Rename-NetworkAdapter cmdlet can work in conjunction with the Get-NetworkAdapter cmdlet. This example will get the adapter with IP Address 192.168.0.44 on the local computer and rename it to 'Backup Adapter':
Get-NetworkAdapter -IPAddress 192.168.0.44 | Rename-NetworkAdapter -NewName "Backup Adapter"