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 200000123456a3ac                          100000123456a3ac Fibre Channel 
PCI\VEN_10DF&DEV_F100&SUBSYS_F10010DF&REV_03\4&26673160&0&011A_0 200000123456a3ad                          100000123456a3ad Fibre Channel 
ROOT\ISCSIPRT\0000_0                                             iqn.1991-05.com.microsoft:HOSTNAME        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.238.237.100
RemotePort              : 443
NameResolutionResults   : 10.238.237.100
MatchingIPsecRules      : 
NetworkIsolationContext : Internet
InterfaceAlias          : Interface_Name - VLAN 123
SourceAddress           : 10.238.237.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       Interface_Mame - VLAN 123       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.238.237.100
   -constraininterface 12 
   -InformationLevel Detailed 
   -DiagnoseRouting
ComputerName                      : 10.238.237.100
RemoteAddress                     : 10.238.237.100
ConstrainInterfaceIndex           : 12
SelectedSourceAddress             : 10.238.237.105
OutgoingInterfaceIndex            : 12
SelectedNetRoute                  : DestinationPrefix: 10.238.237.0/25
                                    NextHop: 0.0.0.0
DestinationAddressSelectionEvents : 
RouteSelectionEvents              : IP: Route [DestinationPrefix: 10.238.237.0/25 NextHop: 0.0.0.0 InterfaceIndex: 8 RouteMetric: 256] is blocked for Destination: 10.238.237.100 
                                    ConstrainInterfaceIndex: 12 ConstrainScopeZone: 1 in Compartment: 1, Reason: Interface Constraint.
SourceAddressSelectionEvents      : 
RouteDiagnosticsSucceeded         : True

Last updated