Get Information about Networking
List WWNs on Windows
PS D:\scripts> get-initiatorport
InstanceName NodeAddress PortAddress ConnectionType
------------ ----------- ----------- --------------
PCI\VEN_10DF&DEV_F100&SUBSYS_F10010DF&REV_03\4&26673160&0&001A_0 200000109b0da3ac 100000109b0da3ac Fibre Channel
PCI\VEN_10DF&DEV_F100&SUBSYS_F10010DF&REV_03\4&26673160&0&011A_0 200000109b0da3ad 100000109b0da3ad Fibre Channel
ROOT\ISCSIPRT\0000_0 iqn.1991-05.com.microsoft:grs11-sbkwp-001 ISCSI ANY PORT iSCSI
Test IP Connections
PS D:\scripts> Test-NetConnection `
-Computername vcenter-esx.customer.local `
-Port 443 `
-InformationLevel Detailed
ComputerName : vcenter-esx.customer.local
RemoteAddress : 10.255.255.100
RemotePort : 443
NameResolutionResults : 10.255.255.100
MatchingIPsecRules :
NetworkIsolationContext : Internet
InterfaceAlias : 20GB_Teaming_Interface - VLAN 208
SourceAddress : 10.255.255.101
NetRoute (NextHop) : 0.0.0.0
TcpTestSucceeded : True
Test IP Connections via a specific Interface
PS D:\Scripts> Get-netipinterface
ifIndex InterfaceAlias AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
1 Loopback Pseudo-Interface 1 IPv6 4294967295 75 Disabled Connected ActiveStore
6 20_GE_Teaming_Interface - VL... IPv4 1500 15 Disabled Connected ActiveStore
12 Storage iSCSI 1 IPv4 1500 15 Disabled Connected ActiveStore
8 Storage iSCSI 2 IPv4 1500 15 Disabled Connected ActiveStore
7 Mgmt IPv4 1500 25 Disabled Connected ActiveStore
3 NIC4 IPv4 1500 5 Enabled Disconnected ActiveStore
1 Loopback Pseudo-Interface 1 IPv4 4294967295 75 Disabled Connected ActiveStore
You see, that each interface has an individual number in the coloumn "ifIndex". Take the number of the desired and use it in the next command....
PS D:\scripts> Test-NetConnection `
-computername 10.255.255.100
-constraininterface 12
-InformationLevel Detailed
-DiagnoseRouting
ComputerName : 10.255.255.100
RemoteAddress : 10.255.255.100
ConstrainInterfaceIndex : 12
SelectedSourceAddress : 10.255.255.105
OutgoingInterfaceIndex : 12
SelectedNetRoute : DestinationPrefix: 10.255.255.0/25
NextHop: 0.0.0.0
DestinationAddressSelectionEvents :
RouteSelectionEvents : IP: Route [DestinationPrefix: 10.255.255.0/25 NextHop: 0.0.0.0 InterfaceIndex: 8 RouteMetric: 256] is blocked for Destination: 10.255.255.100
ConstrainInterfaceIndex: 12 ConstrainScopeZone: 1 in Compartment: 1, Reason: Interface Constraint.
SourceAddressSelectionEvents :
RouteDiagnosticsSucceeded : True
Last updated