Is it possible to use this command to create replica jobs that will target a Cluster and not an individual host? I have it working when sending it to a host, but I have a vCenter in the target site. I'd like to have my jobs target the cluster and not a host.
In fact, it is not even possible in the GUI – even if you select cluster as a target for your replication job, you’ll have to explicitly specify the host to which you’re willing to replicate your VM, otherwise, it won't work.
Therefore, there is no wonder why you can’t do it by the means of Poweshell as well.
When I setup jobs via the GUI I can set a remote Cluster as the replication destination:
I suspect this is a limitation of the command and I will need to use other commands to modify the jobs or manually do it after the fact. I'm still awaiting official word from Veeam.
As I’ve said previously, you can indeed specify the given cluster as a target for your replication job, however, in this case you won’t be able to see any cluster datastores, as they aren’t visible within the GUI, and job setting window won’t give you to proceed any further, since at least one datastore is required to be set.
See this topic for more information regarding this behaviour.
I've setup multiple jobs where the remote Cluster is a destination and a shared datastore is the replication target. I would agree that if there wasn't a shared datastore, selecting a cluster would not work.
I did get an email from Veeam support rep that I will not be able to enter a Cluster into the Add-VBRViReplicaJob, but that I'll have to create it with a host and then switch it to a cluster with the Set-VBRJobOptions so that's what I'm going to investigate next.
That was actually a great help. Thank you for clarifying and providing that script. I will be using that as a basis for a more customized script.
Sidebar question: Can I post other questions about PowerShell scripts online for community assistance? It seemed like it required a ticket to be open with support before I could post my question.
Posting questions that require troubleshooting (error messages, etc.) generally requires a support request, however, "how-to" questions are generally not considered support request since it's not a problem with the product so you can post here without a support request although please search first as there's already a wealth of information. Of course that's not to say that support can't help you with your scripting questions, but if you're simply asking for knowledge then that's what the community is great at.