PowerShell script exchange
Post Reply
jed-hyper
Enthusiast
Posts: 39
Liked: 4 times
Joined: Feb 26, 2014 4:42 am
Full Name: Jed Parkes
Contact:

Powershell to add a copy job from a backup job

Post by jed-hyper »

Within the GUI i can add a backup job as the virtual machine object for the backup copy job setup. When i do this and run the backup copy job it includes any new virtual machines that i have added to main main backup job
How can i do this in powershell?
Using this command I can add a backup copy job with all my VMs but if i add any VMs in the future i will have to manually add them to this backup copy job
Hope that makes sense...

Code: Select all

Add-VBRHvBackupCopyJob -DirectOperation  -Name $Job_Name_BackupJobForever -Repository 'Repository-BackupJob-Forever' -Entity ( Find-VBRHvEntity | Where-Object { $_.Type -eq 'Vm' } )
tsightler
VP, Product Management
Posts: 6035
Liked: 2860 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Powershell to add a copy job from a backup job

Post by tsightler »

Please see the -BackupJob parameter which I believe addresses what your are looking to do:

https://helpcenter.veeam.com/docs/backu ... tml?ver=95
jed-hyper
Enthusiast
Posts: 39
Liked: 4 times
Joined: Feb 26, 2014 4:42 am
Full Name: Jed Parkes
Contact:

Re: Powershell to add a copy job from a backup job

Post by jed-hyper » 1 person likes this post

I missed that one some how, thanks
this work for me

Code: Select all

Add-VBRHvBackupCopyJob -DirectOperation -Name $Job_Name_BackupJobForever -Repository 'Repository-BackupJob-Forever' -BackupJob $Job_Name_BackupJobMain
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests