twstevens
Contributor
Contributor

PowerCLI Script for Vsphere replication Status

Hi 

Needs some help want to create a PowerCLI Scipt that Grabs the Information for the Vpshere replication Status

For example 

Server - Replication Status

Server1 - OK

Server2 - OK

Server3 - Warning

and so on

Ideal to pipe the script out to a Html File or CSV

I have found this http://www.virtu-al.net/2013/06/14/reporting-on-rpo-violations-from-vsphere-replication/ but this only reports Violation and need to some help where to begin

Many Thanks

Tom

0 Kudos
1 Reply
LucD
Leadership
Leadership

I'm afraid that vSphere Replication doesn't have a public API.

The script from Alan looks at Events generated by vSphere Replication, and doesn't "talk" to vSphere Replication itself.

Unless vSphere Replication also produces events, on a regular basis, that report the status of the participating ESXi nodes, I don't think it will be possible to retrieve the Status from somewhere else.

Since I don't have vSphere Replication running, I can't check if there are such events.

Perhaps you could have a look in your environment, and check if there is anything promising in there.
You can go back further in time by changing the Start value.

Get-VIEvent -Start (Get-Date).AddDays(-1) -MaxSamples ([int]::MaxValue) |

where{$_.EventTypeId -match "hbr|rpo" } |

Select CreatedTime, @{N='Type';E={$_.EvenTypeId}},FullFormattedMessage


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos