Edit

Share via


Test-VirtualNetworkConnection

Tests a virtual network connection.

Syntax

Default (Default)

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.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HostName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IsSender

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

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:7
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ListenerCAIP

Specifies the CAIP of the listener.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:10
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ListenerVSID

Specifies the VSID on which to initiate the test.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:11
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MgmtIp

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OperationId

Specifies a unique ID for the test.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PayloadSize

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:13
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SenderCAIP

Specifies the CAIP of the sender.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:8
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SenderVSID

Specifies the VSID of the sender.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:9
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SequenceNumber

Specifies the sequence number to use in the ICMP packets.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:12
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMName

Specifies the name of a virtual machine.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetworkAdapterName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:5
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetworkAdapterProfileId

Specifies the name of the adapter for the desired CAIP.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:6
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

Object