Test-VMReplicationConnection

Test-VMReplicationConnection

Tests the connection between a primary server and a Replica server.

语法

Parameter Set: Default
Test-VMReplicationConnection [-ReplicaServerName] <String> [-ReplicaServerPort] <Int32> [-AuthenticationType] <ReplicationAuthenticationType> {Kerberos | Certificate} [[-CertificateThumbprint] <String> ] [-BypassProxyServer <Boolean]> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [ <CommonParameters>]

详细说明

The Test-VMReplicationConnection cmdlet tests the connection between a primary server and a Replica server to determine whether replication can be enabled for virtual machines on the primary server to the specified Replica server.

参数

-AuthenticationType<ReplicationAuthenticationType>

Specifies the authentication type to use to test the connection, either "Kerberos" or "Certificate". The specified Replica server must support the chosen authentication type. Run the Get-VMReplicationServer cmdlet to verify the authentication configured for the specified Replica server, or contact the administrator of the specified Replica server.

别名

AuthType

是否必需?

true

在哪里?

3

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-BypassProxyServer<Boolean]>

Specifies whether to bypass a proxy server when testing the connectivity.

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-CertificateThumbprint<String>

Specifies the certificate to use for mutual authentication of the replication data. This parameter is required only when “Certificate” is the specified as the type of authentication. Specify the thumbprint of a valid computer certificate from the Personal store.

The certificate must have all of the following properties to be valid:

It must not be expired.

It must include both client and server authentication extensions for extended key usage (EKU), and an associated private key.

It must terminate at a valid root certificate.

The requirement for the subject common name (CN) differs depending on whether the virtual machine belongs to a cluster. For virtual machines that do not belong to a cluster, the subject common name (CN) must be equal to, or subject alternative name (DNS Name) should contain, the FQDN of the host. For virtual machines that belong to a cluster, the subject common name (CN) must be equal to, or subject alternative name (DNS Name) must contain, the FQDN of the Hyper-V Replica Broker.

To display a list certificates in the computer’s My store and the thumbprint of each certificate, type the following:

PS C:\> cd cert:\LocalMachine\My

PS C:\> dir | format-list

For more information about certificate stores, see https://technet.microsoft.com//library/cc757138.aspx.

别名

Thumbprint

是否必需?

false

在哪里?

4

默认值

none

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

false

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

在远程会话中或远程计算机上运行该 cmdlet。输入计算机名或会话对象,如 New-cimsessionGet-cimsession cmdlet 的输出。默认为本地计算机上的当前会话。

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-ComputerName<String[]>

Specifies one or more Hyper-V hosts that have the virtual machines for which you want to test the connection for replication. NetBIOS names, IP addresses, and fully qualified domain names (FQDN) are allowed. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.

别名

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.

别名

none

是否必需?

false

在哪里?

named

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-ReplicaServerName<String>

Specifies the name of the Replica server to test for connectivity with the virtual machine to be replicated.

别名

ReplicaServer

是否必需?

true

在哪里?

1

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

-ReplicaServerPort<Int32>

Specifies the port on the Replica server to use to test connectivity. Make sure you specify a port that is configured on the Replica server to support the same authentication type you specify using the AuthenticationType parameter in this cmdlet. Run the Get-VMReplicationServer cmdlet on the Replica server to check the configuration of the port, or contact the administrator of the specified Replica server.

别名

ReplicaPort

是否必需?

true

在哪里?

2

默认值

none

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持常见的参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 TechNet 上的 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

输入

输入类型是可以传送到 cmdlet 的对象的类型。

  • None.

输出

输出类型是 cmdlet 发出的对象的类型。

  • None.

示例

Example 1

This example tests the connection between the local host and a Replica server named server01.domain01.contoso.com, using port 80 and Kerberos authentication.

PS C:\>  Test-VMReplicationConnection server01.domain01.contoso.com 80 Kerberos