Exclude VM's from job; duplicates...

PowerShell script exchange

Exclude VM's from job; duplicates...

Veeam Logoby decoy5657 » Wed Oct 16, 2013 7:14 pm

Each time I run this, I get a new "copy" of the machine in the exclusion list...


Code: Select all
### Exclude SQL from Development job
$DevSqlBoxes = Get-VBRJob -name "Development" | Get-VBRJobObject  | Where-Object {$_.Name -like "*dvsql*"}
Foreach ($DevSqlBox in $DevSqlBoxes)
{
$DevSqlBox | Remove-VBRJobObject




Is there a way to avoid this? Perhaps completely remove ALL objects from the backup, including exclusions, and then re-add.
decoy5657
Influencer
 
Posts: 12
Liked: 3 times
Joined: Wed Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson

Re: Exclude VM's from job; duplicates...

Veeam Logoby decoy5657 » Wed Oct 16, 2013 8:01 pm 1 person likes this post

I just added the -Completely option... so... problem solved.
decoy5657
Influencer
 
Posts: 12
Liked: 3 times
Joined: Wed Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson

Re: Exclude VM's from job; duplicates...

Veeam Logoby v.Eremin » Thu Oct 17, 2013 11:53 am

Hi, Aaron. Though, please, be aware that with the said flag the script won’t just temporarily exclude given VMs, instead, it will remove them from the job completely.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Exclude VM's from job; duplicates...

Veeam Logoby decoy5657 » Thu Oct 17, 2013 1:07 pm

Yes, for this instance, that's what I want to do.
decoy5657
Influencer
 
Posts: 12
Liked: 3 times
Joined: Wed Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 12 guests