Set-VMReplication
Set-VMReplication
Modifies the replication settings of a virtual machine.
구문
Parameter Set: VMName
Set-VMReplication [-VMName] <String[]> [[-ReplicaServerName] <String> ] [[-ReplicaServerPort] <Int32]> ] [[-AuthenticationType] <ReplicationAuthenticationType]> ] [-AllowedPrimaryServer <String> ] [-AsJob] [-AsReplica] [-AutoResynchronizeEnabled <Boolean]> ] [-AutoResynchronizeIntervalEnd <TimeSpan]> ] [-AutoResynchronizeIntervalStart <TimeSpan]> ] [-BypassProxyServer <Boolean]> ] [-CertificateThumbprint <String> ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-CompressionEnabled <Boolean]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DisableVSSSnapshotReplication] [-EnableWriteOrderPreservationAcrossDisks <Boolean]> ] [-InitialReplicationStartTime <DateTime]> ] [-Passthru] [-RecoveryHistory <Int32]> ] [-ReplicatedDiskPaths <System.String[]> ] [-ReplicatedDisks <Microsoft.HyperV.PowerShell.HardDiskDrive[]> ] [-ReplicateHostKvpItems <Boolean]> ] [-ReplicationFrequencySec <Int32]> ] [-Reverse] [-UseBackup] [-VSSSnapshotFrequencyHour <Int32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMObject
Set-VMReplication [-VM] <VirtualMachine[]> [[-ReplicaServerName] <String> ] [[-ReplicaServerPort] <Int32]> ] [[-AuthenticationType] <ReplicationAuthenticationType]> ] [-AllowedPrimaryServer <String> ] [-AsJob] [-AsReplica] [-AutoResynchronizeEnabled <Boolean]> ] [-AutoResynchronizeIntervalEnd <TimeSpan]> ] [-AutoResynchronizeIntervalStart <TimeSpan]> ] [-BypassProxyServer <Boolean]> ] [-CertificateThumbprint <String> ] [-CompressionEnabled <Boolean]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DisableVSSSnapshotReplication] [-EnableWriteOrderPreservationAcrossDisks <Boolean]> ] [-InitialReplicationStartTime <DateTime]> ] [-Passthru] [-RecoveryHistory <Int32]> ] [-ReplicatedDiskPaths <System.String[]> ] [-ReplicatedDisks <Microsoft.HyperV.PowerShell.HardDiskDrive[]> ] [-ReplicateHostKvpItems <Boolean]> ] [-ReplicationFrequencySec <Int32]> ] [-Reverse] [-UseBackup] [-VSSSnapshotFrequencyHour <Int32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMReplication
Set-VMReplication [-VMReplication] <VMReplication[]> [[-ReplicaServerName] <String> ] [[-ReplicaServerPort] <Int32]> ] [[-AuthenticationType] <ReplicationAuthenticationType]> ] [-AllowedPrimaryServer <String> ] [-AsJob] [-AsReplica] [-AutoResynchronizeEnabled <Boolean]> ] [-AutoResynchronizeIntervalEnd <TimeSpan]> ] [-AutoResynchronizeIntervalStart <TimeSpan]> ] [-BypassProxyServer <Boolean]> ] [-CertificateThumbprint <String> ] [-CompressionEnabled <Boolean]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [-DisableVSSSnapshotReplication] [-EnableWriteOrderPreservationAcrossDisks <Boolean]> ] [-InitialReplicationStartTime <DateTime]> ] [-Passthru] [-RecoveryHistory <Int32]> ] [-ReplicatedDiskPaths <System.String[]> ] [-ReplicatedDisks <Microsoft.HyperV.PowerShell.HardDiskDrive[]> ] [-ReplicateHostKvpItems <Boolean]> ] [-ReplicationFrequencySec <Int32]> ] [-Reverse] [-UseBackup] [-VSSSnapshotFrequencyHour <Int32]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
자세한 설명
The Set-VMReplication cmdlet modifies the replication settings of a virtual machine.
매개 변수
-AsJob
Runs the cmdlet as a background job.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-AuthenticationType<ReplicationAuthenticationType]>
Specifies the authentication type to use for virtual machine replication, 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 |
필수 여부 |
false |
위치 |
4 |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-AutoResynchronizeEnabled<Boolean]>
Enables replicating virtual machines that require resynchronization to be resynchronized automatically. (For example, a virtual machine requires resynchronization if the primary server shuts down abruptly). Resynchronization requires significant storage and processing resources. We recommended scheduling resynchronization during off-peak hours to reduce the impact to the host and other virtual machines running on the host. Use the AutoResynchronizeIntervalStart and AutoResynchronizeIntervalEnd parameters to specify an off-peak time to start the automatic resynchronization.
별칭 |
AutoResync |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-AutoResynchronizeIntervalEnd<TimeSpan]>
Specifies the end of the time period in which you want resynchronization to start automatically.
별칭 |
AutoResyncEnd |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-AutoResynchronizeIntervalStart<TimeSpan]>
Specifies the start of the time period in which you want resynchronization to start automatically.
별칭 |
AutoResyncStart |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-BypassProxyServer<Boolean]>
Specifies whether to bypass a proxy server while replicating data to the Replica server.
별칭 |
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 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 and fully-qualified domain name (FQDN) of the Hyper-V Replica Broker.
To display a list of 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,Cert |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-CimSession<Microsoft.Management.Infrastructure.CimSession[]>
원격 세션이나 원격 컴퓨터에서 cmdlet을 실행합니다. 컴퓨터 이름이나 New-CimSession 또는 Get-CimSession cmdlet의 출력과 같은 세션 개체를 입력하세요. 기본값은 로컬 컴퓨터 상의 현재 세션입니다.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-CompressionEnabled<Boolean]>
Specifies whether replication data sent over the network is to be compressed.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ComputerName<String[]>
Specifies one or more Hyper-V hosts on which replication is to be enabled. 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.
별칭 |
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 |
-InitialReplicationStartTime<DateTime]>
Specifies the time to start the initial replication, when scheduling initial replication to occur later. You can specify a time up to 7 days later. When this parameter is not specified, initial replication occurs immediately.
별칭 |
IRTime |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Passthru
Specifies that a VMReplication object is to be passed through to the pipeline representing the replication configuration to be set.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-RecoveryHistory<Int32]>
Specifies whether to store additional recovery points on the Replica virtual machine. Storing more than the most recent recovery point of the primary virtual machine allows you to recover to an earlier point in time. However, storing additional recovery points requires more storage and processing resources. You can configure as many as 24 recovery points to be stored.
별칭 |
RecHist |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ReplicatedDiskPaths<System.String[]>
Specifies the fully qualified path names of all the virtual hard disks to include for replication. Be sure to include virtual hard disks that are critical to the ability of the virtual machine to start, such as the guest operating system disk. Excluding a critical disk from this list could prevent the replica virtual machine from starting properly.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ReplicatedDisks<Microsoft.HyperV.PowerShell.HardDiskDrive[]>
Specifies all virtual hard disks to include for replication. This parameter can include all the VHDs attached to the virtual mahine or a subset. Be sure to include virtual hard disks that are critical to the ability of the virtual machine to start, such as the guest operating system disk. Excluding a critical disk from this list could prevent the replica virtual machine from starting properly.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Reverse
Reverses the replication of the virtual machine, switching it from a primary virtual machine to a Replica virtual machine, or from a Replica virtual machine to a primary virtual machine.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-VM<VirtualMachine[]>
Specifies the virtual machine for which the replication configuration is to be set.
별칭 |
none |
필수 여부 |
true |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByValue) |
와일드카드 문자 허용 여부 |
false |
-VMName<String[]>
Specifies the name of the virtual machine for which the replication configuration is to be set.
별칭 |
Name |
필수 여부 |
true |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByValue) |
와일드카드 문자 허용 여부 |
false |
-VMReplication<VMReplication[]>
Specifies a virtual machine replication object for which the configuration is to be set.
별칭 |
none |
필수 여부 |
true |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByValue) |
와일드카드 문자 허용 여부 |
false |
-VSSSnapshotFrequencyHour<Int32]>
Specifies the frequency, in hours, at which Volume Shadow Copy Service (VSS) performs a snapshot backup of the virtual machines. Specify this parameter only if application-consistent replication is enabled for the virtual is and the value you set for the RecoveryHistory parameter is not zero. The cmdlet sets a value of zero for this parameter if application-consistent replication is disabled. Do not specify this parameter if you are extending replication from the Replica virtual machine.
별칭 |
VSSFreq |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-AsReplica
Specifies that the virtual machine is a replica virtual machine, enabling it to be used as the source for the initial replication of the primary virtual machine.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-DisableVSSSnapshotReplication
Specifies whether to replicate volume shadow copy service (VSS) snapshots.
별칭 |
DisableVSS |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-EnableWriteOrderPreservationAcrossDisks<Boolean]>
Determines whether all virtual hard disks selected for replication are replicated to the same point in time. This is useful if the virtual machine runs an application that saves data across virtual hard disks (for example, one virtual hard disk dedicated for application data, and another virtual hard disk dedicated for application log files).
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ReplicaServerName<String>
Specifies the name of the Replica server to which this virtual machine will be replicated.
별칭 |
ReplicaServer |
필수 여부 |
false |
위치 |
2 |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ReplicaServerPort<Int32]>
Specifies the port on the Replica server to use for replication traffic. 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 |
필수 여부 |
false |
위치 |
3 |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ReplicateHostKvpItems<Boolean]>
Specifies whether to replicate host-only key value pairs (KVP) for this virtual machine.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-ReplicationFrequencySec<Int32]>
Specifies the frequency, in seconds, at which Hyper-V replicates changes to the Replica server.
별칭 |
RepFreq |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-UseBackup
Specifies that a restored copy of the virtual machine on the Replica server is to be used as the source of the initial replication.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-AllowedPrimaryServer<String>
When you use the AsReplica parameter to specify a virtual machine as a Replica virtual machine, this parameter determines which primary servers can send replication to the Replica virtual machine. Replication is accepted only from the server specified in the chosen authentication entry, or any other authentication entry that has the same trust group.
별칭 |
AllowedPS |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
True (ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Confirm
cmdlet을 실행하기 전에 확인 메시지를 표시합니다.
필수 여부 |
false |
위치 |
named |
기본값 |
false |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-WhatIf
cmdlet이 실행되는 경우 발생할 결과를 보여 줍니다. cmdlet은 실행되지 않습니다.
필수 여부 |
false |
위치 |
named |
기본값 |
false |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)
입력
입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.
출력
출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.
- None by default; VMReplication if –PassThru is specified.
예
Example 1
This example configures the auto-resynchronization of virtual machine VM01.
PS C:\> Set-VMReplication VM01 –AutoResynchronizedDisabled $true –AutoResynchronizeIntervalStart “18:30:00” –AutoResynchronizeIntervalEnd "06:00:00"
Example 2
This example configures virtual machine VM01 as a Replica virtual machine, allowing replication from primary server server01 from domain domain01.contoso.com.
PS C:\> Set-VMReplication VM01 –AsReplica –AllowedPrimaryServer server01.domain01.contoso.com
Example 3
This example configures the recovery history and application-consistent recovery points of the virtual machine VM01.
PS C:\> Set-VMReplication VM01 –RecoveryHistory 4 –VSSSnapshotFrequency 4
Example 4
This example reverses the replication of virtual machine VM01.
PS C:\> Set-VMReplication VM01 -Reverse
Example 5
This example configures replication for all virtual machines on the local Hyper-V host to Replica server server01.domain01.contoso.com and port 80.
PS C:\> Set-VMReplication * server01.domain01.contoso.com 80
Example 6
The first command assigns the paths of the virtual hard disks vhd1 and vhd2 to the $VHDS variable.
The second command specifies the two disks in $VHDS to be a part of the included disk set for replication of virtual machine VM01.
PS C:\> $VHDS = @("C:\VHDS\vhd1", "C:\VHDS\vhd2")
PS C:\> Set-VMReplication -VMName "VM01" -ReplicatedDiskPaths $VHDS