PowerShell script exchange
Post Reply
HaDeLe
Novice
Posts: 5
Liked: 2 times
Joined: Aug 18, 2014 11:28 am
Full Name: Hans De Leenheer
Location: Belgium
Contact:

Reporting Replica Status

Post by HaDeLe »

Hi,

I need to give a report on the status of replication of every VM. So this question goes two-fold:
1) to show the last succeeded Replica
2) to show every VM that is NOT replicated (comparing to vCenter 1)

For the first part I am having some luck with

Code: Select all

Get-Replica ¦ % { $_.getLastReplicaOibs() } | Sort-Object -Descending "creationtime" 
but it still gives some issues with a replica that is in warning state due to an 'incomplete'

Image

For the second script I have no clue how to get it even started.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Reporting Replica Status

Post by veremin » 1 person likes this post

Hi Hans, do you have Veeam ONE deployed? If so, you can use its predefined report called "Protected VMs" that seems to provide information you're after. Thanks.
HaDeLe
Novice
Posts: 5
Liked: 2 times
Joined: Aug 18, 2014 11:28 am
Full Name: Hans De Leenheer
Location: Belgium
Contact:

Re: Reporting Replica Status

Post by HaDeLe »

If only it was that simple :)

No we do not have VeeamONE but we do have SCOM Management Pack. The problem with that is that the SCOM reports are all job-based and not VM-based.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Reporting Replica Status

Post by veremin »

Then, I would recommend checking this thread that contains working script examples. One thing you will have to change is the sessions' collection, because the referenced thread talks about backups, not replicas. You can try to get only replica sessions, using the following code:

Code: Select all

Get-VBRBackupSession | where {$_.JobType -eq "Replica"}
Thanks.
HaDeLe
Novice
Posts: 5
Liked: 2 times
Joined: Aug 18, 2014 11:28 am
Full Name: Hans De Leenheer
Location: Belgium
Contact:

Re: Reporting Replica Status

Post by HaDeLe » 1 person likes this post

UPDATE: the Protected VMs report is also available in SCOM and actually does pretty much the trick very well :)
The only problem is that the report, even when choosing Replica jobs, still shows "Backup" as the title everywhere. But I'm sure Alec & Teeam will get that sorted out one day.

Image
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Reporting Replica Status

Post by veremin »

I've passed this information to the right individual. Thanks for the heads-up!
Post Reply

Who is online

Users browsing this forum: caleb.boyd and 18 guests