Windows netsh networking

From Ever changing code
Jump to navigation Jump to search

Examples of use of netsh.exe Windows command-line utility to manipulate local or remote machine network configuration

List IPv4 and IPv6 addresses

It gives nicer output than ipconfig

netsh interface ip show addresses
netsh interface ipv6 show addresses

Set IPv4 address

netsh interface ip set address "Ethernet" static hostipaddress 255.255.255.0 hostgatewayaddress
netsh interface ip set address "Ethernet" static 10.50.10.41 255.255.255.0 10.50.41.1

Set IPv6 address

Configure interface with ipv6 address, interface name "Local Area Connection"

netsh interface ipv6 set address "Local Area Connection" 2001:db8:acad:1::3

Import wireless profile

Export profile
Netsh wlan export profile folder= PathAndFileName [[name=] ProfileName] 	[[interface=] InterfaceName] [[key=] clear]
Netsh wlan export profile folder=%USERPROFILE%\Downloads\Wifiprofiles name=Guest_wireless interface="Wireless Network Connection"
Import profile
Netsh wlan add profile filename= PathAndFileName [[interface=]InterfaceName] [[user=]{all|current}]
Netsh wlan add profile filename="Wireless Network Connection-Guest_wireless.xml" interface="Wireless Network Connection" user=all

Check wireless card band capability - 2.4Ghz or 5Ghz

netsh wlan show drivers
Netsh-wlan-bands
  • If the network adapter supports network modes 802.11g and 802.11n:
    • The computer has 2.4 GHz network capability ONLY & IS NOT Dual-Band Capable.
  • If the network adapter supports network modes 802.11a and 802.11g and 802.11ac and 802.11n:
    • The computer has 2.4 GHz and 5GHz network capability IS Dual-Band Compable.
  • The network adapter supports network modes 802.11n and 802.11g and 802.11b:
    • The computer has 2.4GHz network capability ONLY & IS NOT Dual-Band Capable.

References