Test-VirtualNetworkConnection

Tests a virtual network connection.

Syntax

Test-VirtualNetworkConnection
    [-OperationId] <String>
    [[-HostName] <String>]
    [[-MgmtIp] <String>]
    [[-Creds] <PSCredential>]
    [[-VMName] <String>]
    [[-VMNetworkAdapterName] <String>]
    [[-VMNetworkAdapterProfileId] <String>]
    [-IsSender] <Boolean>
    [-SenderCAIP] <String>
    [-SenderVSID] <Int32>
    [-ListenerCAIP] <String>
    [-ListenerVSID] <Int32>
    [-SequenceNumber] <Int32>
    [[-PayloadSize] <Int32>]
    [<CommonParameters>]

Description

The Test-VirtualNetworkConnection cmdlet tests connectivity over a virtual network by sending Internet Control Message Protocol (ICMP) packets between two Customer Address IP addresses (CAIPs). The two nodes can reside on the same virtual subnet ID (VSID), or they can share a VSID.

Examples

Example 1: Test a virtual network connection by sending

PS C:\> $cred = Get-Credential
PS C:\> Test-VirtualNetworkConnection -OperationId "27" -HostName "host1.corp.com" -MgmtIP "192.10.10.11" -Creds $creds -VMName "TennantVM1" -VMNetworkAdapterName "Tennant1VMAdapter1" -IsSender $True -SenderCAIP "10.123.176.108" -SenderVSID 6001 -ListenerCAIP "10.123.176.108" -ListenerVSID 6001 -SequenceNumber 33 -PayloadSize 1500

The first command gets the credentials for the current user, and then stores them in the $cred variable.

The second command tests the specified virtual network connection.

Example 2: Test a virtual network connection by receiving

PS C:\> $password = ConvertTo-SecureString -String "password" -AsPlainText -Force
PS C:\> $cred = New-Object PSCredential -ArgumentList (".\administrator", $password) 
PS C:\> Test-VirtualNetworkConnection -OperationId "27" -HostName "host2.corp.com" -MgmtIP "192.10.10.12" -Creds $cred -VMName "TennantVM2" -VMNetworkAdapterName "Tennant1VMAdapter2" -SenderCAIP "10.123.176.108" -SenderVSID 6001 -ListenerCAIP "10.123.176.109" -ListenerVSID 6001

The first command converts a plain text password to a secure string, and then stores it in the $password variable.

The second command creates a PSCredential object, and then stores it in the $cred variable.

The third command tests the specified virtual network connection.

Parameters

-Creds

Specifies the credentials for Network Controller. Specify this parameter for Kerberos deployments.

Type:PSCredential
Position:3
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostName

Specifies the name of the host on which to run the test.

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IsSender

Indicates whether this operation is for the sender or receiver. One of each is required.

Type:Boolean
Position:7
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ListenerCAIP

Specifies the CAIP of the listener.

Type:String
Position:10
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ListenerVSID

Specifies the VSID on which to initiate the test.

Type:Int32
Position:11
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MgmtIp

Specifies the IP of the management host on which to initiate the test.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OperationId

Specifies a unique ID for the test.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PayloadSize

Specifies the size of the payload to carry in ICMP messages.

Type:Int32
Position:13
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SenderCAIP

Specifies the CAIP of the sender.

Type:String
Position:8
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SenderVSID

Specifies the VSID of the sender.

Type:Int32
Position:9
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SequenceNumber

Specifies the sequence number to use in the ICMP packets.

Type:Int32
Position:12
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMName

Specifies the name of a virtual machine.

Type:String
Position:4
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMNetworkAdapterName

Specifies the name of the virtual machine with the desired CAIP.

Type:String
Position:5
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMNetworkAdapterProfileId

Specifies the name of the adapter for the desired CAIP.

Type:String
Position:6
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Object