Powershell - Managing the status and configuration of network interfaces
To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker, purchase my 3D plans, or make a donation or subscribe on Ko-Fi. Thank you!
Hello, here is a set of commands for viewing and modifying the status and configuration of network interfaces. The menu includes renaming a network interface, disabling IPv6, enabling/disabling an interface, etc.
There are other commands specific to the configuration of VMQ, QOS, RDMA, RSS, SRIOV, etc. that I won’t go into in this article.
IP configuration will be the subject of a future article.
# List network commands with the status and configuration of network interfacesGet-Command -Noun NetAdapter*
# List network interfacesGet-NetAdapter
# List physical network interfaces onlyGet-NetAdapter -Physical
# List enabled physical network interfaces onlyGet-NetAdapter -Physical | Where-Object Status -eq Up
# List network interfaces as well as hidden onesGet-NetAdapter -IncludeHidden
# List a network interface using its descriptionGet-NetAdapter -InterfaceDescription *realtek* # List a network interface using its description
# List a network interface using its indexGet-NetAdapter -InterfaceIndex 4
# List a network interface using its nameGet-NetAdapter -Name ‘Ethernet 3’
# List a network interface using its name and a wildcard characterGet-NetAdapter -Name ‘Ethernet*’ # Rename a network interface using its name and wildcard character
# Rename a network interfaceRename-NetAdapter -Name Ethernet -NewName LAN
# Enable a network interfaceEnable-NetAdapter -Name Ethernet
# Disable a network interfaceDisable-NetAdapter -Name Ethernet
# Display information such as status, link speed or Vlan IDGet-NetAdapter | Select-Object -Property Name, Status, Linkspeed, VlanID
# Display information such as the driver used by a network interfaceGet-NetAdapter | Select-Object -Property Name, DriverName, DriverVersion, DriverInformation, DriverFileName
# Display all the properties of a network interfaceGet-NetAdapter -Name Ethernet | Select-Object -Property *
# Rename a network interfaceGet-NetAdapter -Name Ethernet | Rename-NetAdapter -NewName LAN1
# Display the bindings (transport or filter) of network interfacesGet-NetAdapterBinding -Name Ethernet -AllBindings
# List network interfaces with IPv6 enabledGet-NetAdapterBinding -Name * | Where-Object -FilterScript { ($_.ComponentID -eq 'ms_tcpip6') -and ($_.Enabled -eq $true) }
# Disable IPv6Set-NetAdapterBinding -Name Ethernet -ComponentID ms_tcpip6 -Enabled $false
# Display the status of network interface power management functionsGet-NetAdapterPowerManagement -Name Ethernet | select Name, WakeOnMagicPacket
# Modify the state of a network interface power management feature# Enable WakeONlANSet-NetAdapterPowerManagement -Name Ethernet -WakeOnMagicPacket Enabled# Note: the interface must be restarted to apply the configuration.
# Restart a network interfaceRestart-NetAdapter -Name LAN
# Display the advanced configuration of the network interfaceGet-NetAdapterAdvancedProperty -Name Ethernet | Select-Object -Property DisplayName, DisplayValue, ValidDisplayValues# OrGet-NetAdapterAdvancedProperty -Name Ethernet | Select-Object -Property DisplayName, RegistryKeyword, Registryvalue
# Modify an advanced network interface configuration using display valuesSet-NetAdapterAdvancedProperty -Name Ethernet -DisplayName 'Vlan ID' -DisplayValue 2# Note: the interface must be restarted to apply the configuration.
# Modify an advanced network interface configuration using registry valuesSet-NetAdapterAdvancedProperty -Name Ethernet -RegistryKeyword RegVlanid -RegistryValue 2# Note: This modification requires the interface to be restarted in order to apply the configuration.Related links
Powershell - Simply send objects to different variables
Powershell - Tip - Simply send objects to different variablesPowershell - Testing network connectivity and port accessibility
Testing network connectivity and port accessibility with PowershellPowershell - Display network connections (equivalent to netstat)
Display network connections (listening ports, active connections...)Powershell - Testing name resolution (equivalent to nslookup)
Powershell commands to test name resolution (equivalent to nslookup)Powershell - View and manage DNS configuration of network interfaces
Powershell commands to display and manage DNS configuration of network interfacesPowershell - Managing IP configuration of network interfaces
Powershell commands to view and modify the IP configuration of network interfaces
Follow me on
Support me
E-shop
Last content
Powershell - Simply send objects to different variables
Portsmouth Vintage Travel poster - hueforge
Andalucia vintage poster - hueforge
Paris Travel poster - hueforge