Проблема Test-NetConnection с ConstrainInterface - PullRequest
0 голосов
/ 23 января 2020

Как проверить связь между двумя другими интерфейсами, отличными от данных? Например, я хочу проверить связь TCP между двумя голосовыми интерфейсами. НЕ Пинг. IP-адрес источника 10.116.69.215 IP-адрес назначения 10.104.74.145 Ранее я пытался:

Test-NetConnection -Port 5060 -ComputerName 10.104.74.145

Но я получаю только сводные данные из данных интерфейса.

ComputerName           : 10.104.74.145
RemoteAddress          : 10.104.74.145
RemotePort             : 5060
InterfaceAlias         : VMAccess
SourceAddress          : 10.116.64.202
PingSucceeded          : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded       : False

Я пытался изменить командлет. Итак, я начал с Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status
----                      --------------------                    ------- ------
BackupNet                 Microsoft Hyper-V Network Adapter #3         15 Up
VoiceNet                  Microsoft Hyper-V Network Adapter #4         17 Up
VMAccess                  Microsoft Hyper-V Network Adapter #2         14 Up
BootNet                   Microsoft Hyper-V Network Adapter            13 Not Present

Test-NetConnection 10.104.74.145 -Порт 5060 -ConstrainInterface 17 -DiagnoseRouting -InformationLevel Подробный

, но я получаю:

Test-NetConnection : A parameter cannot be found that matches parameter name 'ConstrainInterface'.
At line:1 char:45
+ ... st-netconnection 10.102.73.135 -Port 5060 -ConstrainInterface 17 -Dia ...
+                                               ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Test-NetConnection], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Test-NetConnection

Что не так?

1 Ответ

0 голосов
/ 23 января 2020

Невозможно использовать -port с этим набором параметров.

Test-NetConnection
    [[-ComputerName] <String>]
    [-DiagnoseRouting]
    [-ConstrainSourceAddress <String>]
    [-ConstrainInterface <UInt32>]
    [-InformationLevel <String>]
    [<CommonParameters>]
...