Getting Wireless Information From Netsh
netsh is a command-line utility to configure a Windows machine from the command-line. Here I'm going to show the commands to get information about the wireless interface.
drivers:
interface:
The Base Query Command
The command takes the form:netsh wlan show <what>
The Whats
all:netsh wlan show allShows all the available information concatenated together.
drivers:
netsh wlan show driversShows driver information for the interface.
interface:
netsh wlan show interfaceShows the interface information. Sample output:
There is 1 interface on the system:
Name : Wireless Network Connection
Description : Intel(R) Centrino(R) Wireless-N 100
GUID : 580dc1eb-f5cd-4eb9-8483-cff1a9e2f0f8
Physical address : 78:92:9c:8d:e1:5e
State : connected
SSID : allionstaff
BSSID : 18:33:9d:f9:ad:10
Network type : Infrastructure
Radio type : 802.11g
Authentication : WPA2-Personal
Cipher : CCMP
Connection mode : Auto Connect
Channel : 6
Receive rate (Mbps) : 72
Transmit rate (Mbps) : 72
Signal : 99%
Profile : allionstaff
Hosted network status : Not started
Getting The IP Address
To get the IP address you need to use a different subset (not wlan):netsh interface ipv4 show addressesSample output:
Configuration for interface "Wireless Network Connection 3"
DHCP enabled: Yes
InterfaceMetric: 5
Configuration for interface "Wireless Network Connection 2"
DHCP enabled: Yes
InterfaceMetric: 5
Configuration for interface "Wireless Network Connection"
DHCP enabled: Yes
IP Address: 192.168.2.84
Subnet Prefix: 192.168.2.0/24 (mask 255.255.255.0)
Default Gateway: 192.168.2.1
Gateway Metric: 0
InterfaceMetric: 25
Configuration for interface "Local Area Connection"
DHCP enabled: No
IP Address: 192.168.10.63
Subnet Prefix: 192.168.10.0/24 (mask 255.255.255.0)
Default Gateway: 192.168.10.1
Gateway Metric: 256
InterfaceMetric: 10
Configuration for interface "Loopback Pseudo-Interface 1"
DHCP enabled: No
IP Address: 127.0.0.1
Subnet Prefix: 127.0.0.0/8 (mask 255.0.0.0)
InterfaceMetric: 50