Looking at Replica Delta in Hyper-V with PowerShell

Rate This
  • Comments 2

If you have used Hyper-V Replica, you will know about the replica status column.  This is the part of the user interface where we tell you what the state of replica is: normal, warning or critical.  A simple interpretation of these states is:

  • Normal: everything is fine, nothing to worry about.
  • Warning: there have been some problems, but we think we can fix them for you.
  • Critical: things have gone past the point where we can fix them, you need to intervene.

On issue that I have encountered with my home configuration is that there is that there can be a wide variance in the “warning” state.  To help me to better understand what is going on with a virtual machine that is in the “warning” state I like to see how far behind the replica virtual machine is from the primary virtual machine.

You can do this quite easily through the user interface by bringing up the Hyper-V Replica health report for a single virtual machine.  But there is no easy way to do this for multiple virtual machines at once, that is unless you use PowerShell!

Here is a little one-liner that I put together that will show you the current replication delta for all your virtual machines:

get-vm | Get-VMReplication | select name, replicationmode, replicationhealth,  @{Expression={"{0:N0}" -f ((get-date)-($_.lastreplicationtime)).TotalMinutes};Label="Delta (min)"}

Which looks like this when run:


Note – this screenshot comes from after I needed to change a disk in one of my systems, and then resync the virtual machines.  At this point in time all virtual machines have resynced except for my file server.


Leave a Comment
  • Please add 7 and 8 and type the answer here:
  • Post
  • Hi Ben,

    very nice hint.

    Thank you.

    Kind regards,


  • Hi Ben,

    I've been struggling with our new Hyper-V Replica infrastructure, a site HV-cluster to another site HV-cluster- the issue is every time I tried replicating a VM from a hyper-V cluster to another via a broker, the virtualized host got frozen and I had to hard reboot it. The same problem occurred when I tried testing it using PS.

    To your understanding, we have HP enclosures for both sites, same HW/Specs, using Blades; SAS as storage, CSV 's are used in each cluster. The platform for all nodes are W2012 Data Center.

    Appreciate if you can advise what's the cause, hence the solution. You can mail me at dtwinva@gmail.com

Page 1 of 1 (2 items)

Looking at Replica Delta in Hyper-V with PowerShell