logo

Quick Post: One-Liner PowerCLI to get vSphere Replication Statistics

Recently had a request to provide statistics/ script-out the data that is exposed by vSphere Replication report tab.

Based from a post from Virtu-al, you can get the transferred bytes from one of the Arguments value in the Completed Event.

Here’s a quick one liner to expose all the events.

 

Get-VIEvent -MaxSamples ([int]::MaxValue) | Where { $_.EventTypeId -match “hbr|rpo” } | Select CreatedTime, FullFormattedMessage, @{Name=”VMName”;Expression={$_.Vm.Name}}, @{Name=”Size”;Expression={$_.Arguments.Value}}

Enjoy!

  1. Leo Ching Reply

    Hi, it work. Thanks for the script. Can powerCLI extract out SRM report of the VM’s “Last sync duration, Last instance sync point and Last sync Size”?
    can give some example for this?

  2. usersc Reply

    Hi for me its not working.throwing error.In this “VMName” means what we need to keep??can we keep Vcenter name??

Leave a Reply

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.