Retrieving Information
You can retrieve Zerto Virtual Replication information from sites via the following cmdlets:
Get-Checkpoints – Retrieves the checkpoints in the journal for a specified VPG. This cmdlet is described in
Retrieving a List of Checkpoints.
Get-VmsReplicatingToHost – Retrieves all the protected virtual names being recovered to a specified target host. This cmdlet is described in
Retrieving a List of Virtual Machines Recovering to a Host.
Get-ProtectionGroups – Retrieves all the names for the VPGs
defined on a specified site and on any other site paired with the specified site. This cmdlet is described in
Retrieving a List of VPGs.
Get-Sites – Retrieves the list of all the site names for sites paired with the site where the Zerto Virtual Manager is installed that is used to process the cmdlet. This cmdlet is described in
Retrieving a List of Sites.
Retrieving a List of Checkpoints
The Get-Checkpoints cmdlet retrieves all the checkpoints in the journal for a specified VPG and marks whether they were added manually, by including the tag used when the checkpoint was created or were added via the ZertoVssAgent, in which case the Vss entry for the checkpoint in the output is True.
To retrieve the list of checkpoints for a VPG:
1. Run the Get-Checkpoint cmdlet from the PowerShell prompt.
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> Get-Checkpoints |
2. You are prompted for the VPG which includes the checkpoints you want to retrieve. The VPG name is case-sensitive.
3. You are prompted for the IP address of one of the Zerto Virtual Manager sites, either where the virtual machines in the VPG are protected or recovered, for the HTTP port used for inbound communication with that Zerto Virtual Manager and a valid username and password, defined in the
users.txt file for the Zerto Virtual Manager where the cmdlet is run, as described in
Defining Credentials to Run Zerto Virtual Replication Cmdlets.
The Get-Checkpoint cmdlet completes, returning the list of checkpoints.
You can specify a single checkpoint from the list using a script similar to the following, which sets $last_cp to the last checkpoint retrieved:
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> $cp_list = Get-CheckPoints 127.0.0.1 9080 -Username usr -Password pswd -VirtualProtectionGroup ’MyVPG’ $last_cp = $cp_list[$cp_list.Count-1] |
Note that the checkpoint list is zero-based.
Retrieving a List of Virtual Machines Recovering to a Host
You can retrieve a list of protected virtual machines being recovered to a specified host. The cmdlet to retrieve the list must be run on the recovery site.
To retrieve the list of virtual machines:
1. Run the Get-VmsReplicatingToHost cmdlet from the PowerShell prompt.
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> Get-VmsReplicatingToHost |
2. You are prompted for the recovery host IP address or domain name. The value specified must align with how the host is registered in the VMware vCenter Server or Microsoft SCVMM.
3. You are prompted for the IP address of the Zerto Virtual Manager for the host, for the HTTP port used for inbound communication with that Zerto Virtual Manager and a valid username and password, defined in the
users.txt file for the Zerto Virtual Manager where the cmdlet is run, as described in
Defining Credentials to Run Zerto Virtual Replication Cmdlets.
The Get-VmsReplicatingToHost cmdlet completes, returning the list of virtual machines recovered to the host.
Retrieving a List of VPGs
Whenever you retrieve information about VPGs at a site you can also retrieve information about any paired site.
To retrieve the list of VPGs:
1. Run the Set-Checkpoint cmdlet from the PowerShell prompt.
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> Get-ProtectionGroups |
2. You are prompted for a site that includes the VPGs that you want listed, either because it is protecting a VPG or paired to a site that is protecting a VPG.
3. You are prompted for the IP address of one of the Zerto Virtual Manager sites, either where the virtual machines in the VPG are protected or recovered, for the HTTP port used for inbound communication with that Zerto Virtual Manager and a valid username and password, defined in the
users.txt file for the Zerto Virtual Manager where the cmdlet is run, as described in
Defining Credentials to Run Zerto Virtual Replication Cmdlets.
The Get-ProtectionGroups cmdlet completes, returning the list of VPGs.
Note: If you don’t know the name of a site, you can retrieve it as described in
Retrieving a List of Sites.
Retrieving a List of Sites
To retrieve the list of sites:
1. Run the Get-Sites cmdlet from the PowerShell prompt.
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> Get-Sites |
2. You are prompted for the IP address of one of the Zerto Virtual Manager sites, for the HTTP port used for inbound communication with that Zerto Virtual Manager and a valid username and password, defined in the
users.txt file for the Zerto Virtual Manager where the cmdlet is run, as described in
Defining Credentials to Run Zerto Virtual Replication Cmdlets.
The Get-Sites cmdlet completes, returning the list of sites paired with the site where the specified Zerto Virtual Manager runs.