List IP Configuration for Network Adapters

The following will list the IP configuration for all Network Adapters that are currently enabled. If you need to search for additional properties in the Win32_NetworkAdapterConfiguration, the following command can be used: Get-WmiObjectWin32_NetworkAdapterConfiguration | Get-Member

This script will list IP Address, IP Subnet, IP Default Gateway, and MAC Address for each IP enabled adapter.

$Network = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled='True'

# ********** Get IP Information for each IP Enabled Interface **************
 If ($Network -ne $null)
 {
 Foreach ($Item in $Network)
 {
 $Item.Description
 if ($Item.IPAddress -ne $null) {$Item.IPAddress[0]}
 if ($Item.IPSubnet -ne $null) {$Item.IPSubnet[0]}
 if ($Item.DefaultIPGateway -ne $null) {$Item.DefaultIPGateway[0]}
 $Item.MACAddress
" "
}
 }
 # *****************************************************************