Zerto Virtual Replication Cmdlets Reference : Set-ChangeRecoveryHost
  
Set-ChangeRecoveryHost
Sets the host used to recover the specified protected virtual machine.
Syntax
Set-ChangeRecoveryHost [-ZVMIP] <String> [-ZVMPort] <Int32> [-Username] <String> [-Password] <String> [-VmName] <String> [-NewTargetHost] <string> [-CurrentTargetHost] <string> [-Wait <int32>] [<Common&RiskParameters>]
Description
The Set-ChangeRecoveryHost cmdlet sets the host used to recover the specified protected virtual machine to the specified new host, as long as the specified new host can access that storage used by the VRA in the old host.
Parameters
[-ZVMIP] <String>
The IP address of the machine where the Zerto Virtual Manager is installed that is used to process the cmdlet. The host must be defined in the hypervisor management tool, VMware vCenter Server or Microsoft SCVMM, or in VMware vCD, connected to this Zerto Virtual Manager site.
Required?
True
Position?
1 or named
Default Value
None
Accept Wildcard Characters?
False
[-ZVMPort] <Int32>
The HTTP port used for inbound communication with the Zerto Virtual Manager for APIs and cmdlets, specified during the installation. The default port recommended during installation is 9080.
Required?
True
Position?
2 or named
Default Value
None
Accept Wildcard Characters?
False
[-Username] <String>
A username defined in the users.txt file in the Zerto Virtual Replication installation folder, for the Zerto Virtual Manager where the cmdlet is run.
Required?
True
Position?
3 or named
Default Value
None
Accept Wildcard Characters?
False
[-Password] <String>
The password for the specified username, in the users.txt file in the Zerto Virtual Replication installation folder, for the Zerto Virtual Manager where the cmdlet is run, encrypted using SHA-1.
Required?
True
Position?
4 or named
Default Value
None
Accept Wildcard Characters?
False
[-VmName] <String>
The name of the protected virtual machine for which the host needs to be changed. The name is case-sensitive.
Required?
True
Position?
5 or named
Default Value
None
Accept Wildcard Characters?
False
[-NewTargetHost] <String>
The IP address or domain name of the host which will be used to recover the specified virtual machine. The storage of the original host used to recover the virtual machine must be accessible to the new host.
Required?
True
Position?
6 or named
Default Value
None
Accept Wildcard Characters?
False
[-CurrentTargetHost] <String>
The IP address or domain name of the host where the virtual machine is currently being recovered.
Required?
True
Position?
6 or named
Default Value
None
Accept Wildcard Characters?
False
-Wait <Int32>
The number of seconds to wait before timing out.
Required?
False
Position?
Named
Default Value
None
Accept Wildcard Characters?
False
<Common&RiskParameters>
This cmdlet supports the parameters described in Optional PowerShell Parameters.
Inputs and Outputs
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.
Inputs
None.
Outputs
Set-ChangeRecoveryHost returns the task identifier for the command and the site identifier for the recovery host.
Notes
This cmdlet is used when the current host will not be available for recovery, for example when it will undergo maintenance.
See Also
Get-VmsReplicatingToHost
Example 1
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> Set-ChangeRecoveryHost 182.24.123.123 9080 administrator password -vmname 'MS SQL Server' -newtargethost 182.24.123.11 -currenttargethost 182.24.123.17
This command sets the host for the MS SQL Server virtual machine. The Zerto Virtual Manager used to process the cmdlet runs on IP 182.24.123.123 and port 9080.
The cmdlet returns the command task identifier and site identifier. For example:
Identifier                               SiteId
----------                               ------
b4eba428-9b53-4e96-9e39-ba363bfb2e41     d2da8a37-68f0-4464-a70c-abb19683fd01