I am trying to write a powershell script that will remote into the main Veeam Backup & Replication server and pull all the Replica VMs. So far the script that I have written seems to pull all the replica VMs but its also pulling VMs not shown in Veeam, when I look at the console under Replica. These are old VMs that have been removed long ago but for some reason is showing in the results. Any help is appreciated.
Looks like the script is getting task sessions of replication jobs which still exist in Veeam configuration database instead of querying replica objects.
Please try to use this cmdlet and let us know the result.
Thanks for the reply, I was playing around with Get-VBRReplica, but wasn't sure how to pull the list of VMs in the job. I only get the list of replica jobs. If I choose one of the jobs its just list the job details (Job Name, Type, Creation Time, VM Count)
The end goal is to grab a list of VMs that have been replicated then cross reference that list with VMWare and pull the tags from the VM from VMWare. I use tagging in VMWare to assign VMs to backup and replica jobs. I use two products for replication, Zerto and Veeam. I just want to verify both are not replicating the same VM.
I just want to verify both are not replicating the same VM
But wouldn't it be easier to create two tags (Veeam, Zerto), assign them to corresponding VMs and use these tags as source for Veeam and Zerto jobs accordingly? Thanks!
digitalexpl0it wrote: ↑Oct 15, 2019 12:09 am
I was playing around with Get-VBRReplica, but wasn't sure how to pull the list of VMs in the job. I only get the list of replica jobs. If I choose one of the jobs its just list the job details (Job Name, Type, Creation Time, VM Count)
Please try to pass job names from Get-VBRReplica stdout to Get-VBRJobObject cmdlet as -Job parameter inside a ForEach statement:
veremin wrote: ↑Oct 15, 2019 10:16 am
But wouldn't it be easier to create two tags (Veeam, Zerto), assign them to corresponding VMs and use these tags as source for Veeam and Zerto jobs accordingly? Thanks!
This is what I am doing already for the past 4 years. Zerto doesn't support VMWare tagging.
I am now able to pull whats in the Replica Jobs, but since I used tags for all my jobs, only the tags are pulled. I think my original way will work, I just need to verify it exists in VMWare before doing any checks on the VMs
I am now able to pull whats in the Replica Jobs, but since I used tags for all my jobs, only the tags are pulled.
Then,
- Check what VMs are located under those tags, using Find-VBRViEntity cmdlet
- Compare two resulting lists and check whether there are any VMs present in both lists
Do you know if it is possible to list the name of all VM in "Replica" and not the Job Name ? (I already used the cmd Get-VBRReplica and it only gave me JobName)