Test-VMNetworkAdapter

Test-VMNetworkAdapter

Tests connectivity between virtual machines.

構文

Parameter Set: VMName
Test-VMNetworkAdapter [-VMName] <String> -ReceiverIPAddress <System.String> -SenderIPAddress <System.String> -SequenceNumber <System.Int32> [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <System.String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-IsolationId <Nullable [System.Int32]> ] [-Name <System.String> ] [-NextHopMacAddress <System.String> ] [-Passthru] [-Receiver] [-Sender] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ResourceObject
Test-VMNetworkAdapter [-VMNetworkAdapter] <VMNetworkAdapter> -ReceiverIPAddress <System.String> -SenderIPAddress <System.String> -SequenceNumber <System.Int32> [-IsolationId <Nullable [System.Int32]> ] [-NextHopMacAddress <System.String> ] [-Passthru] [-Receiver] [-Sender] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VMObject
Test-VMNetworkAdapter [-VM] <VirtualMachine> -ReceiverIPAddress <System.String> -SenderIPAddress <System.String> -SequenceNumber <System.Int32> [-IsolationId <Nullable [System.Int32]> ] [-Name <System.String> ] [-NextHopMacAddress <System.String> ] [-Passthru] [-Receiver] [-Sender] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Test-VMNetworkAdapter cmdlet tests connectivity between virtual machines by using Internet Control Message Protocol (ICMP) Ping packets. Ping verifies IP-level connectivity to another TCP/IP computer by sending ICMP Echo Request messages.

パラメーター

-CimSession<Microsoft.Management.Infrastructure.CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ComputerName<System.String[]>

Specifies one or more Hyper-V hosts on which this cmdlet operates. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Credential<System.Management.Automation.PSCredential[]>

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-IsolationId<Nullable [System.Int32]>

Specifies the ID of a virtual subnet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Name<System.String>

Specifies the name of the virtual machine.

Aliases

VMNetworkAdapterName

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-NextHopMacAddress<System.String>

Specified the MAC address for the next hop VM required for non-Hyper-V Network Virtualization configurations.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Passthru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットから出力は生成されません。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Receiver

Indicates that the cmdlet targets the receiver virtual machine.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ReceiverIPAddress<System.String>

Specifies the IP address of the receiver virtual machine.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Sender

Indicates that the cmdlet targets the sender virtual machine.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-SenderIPAddress<System.String>

Specifies the IP address of the sender virtual machine.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-SequenceNumber<System.Int32>

Specifies the sequence number to use to generate ICMP Ping packets. The default value is 100.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-VM<VirtualMachine>

Specifies a virtual machine. The cmdlet tests connectivity for adapters that belong to the virtual machines that you specify.

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-VMName<String>

Specifies the name of a virtual machine.

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-VMNetworkAdapter<VMNetworkAdapter>

Specifies a virtual machine network adapter as a VMNetworkAdapterBase object. The cmdlet tests connectivity for the adapters that you specify. To obtain a network adapter, use the Get-VMNetworkAdapter cmdlet.

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

True (ByValue)

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

使用例

Example 1: Test connectivity

This command tests connectivity by using the virtual network adapter named ContosoNic01. The command targets the receiver virtual machine.

PS C:\> Test-VMNetworkAdapter –VMName "ContosoVM01" –Receiver –SenderIPAddress "10.20.20.5" –ReceiverIPAddress "10.20.20.6" –VMNetworkAdapterName "ContosoNic01"

関連項目

Add-VMNetworkAdapter

Connect-VMNetworkAdapter

Disconnect-VMNetworkAdapter

Get-VMNetworkAdapter

Remove-VMNetworkAdapter

Rename-VMNetworkAdapter

Set-VMNetworkAdapter