PowerShell script exchange
decoy5657
Influencer
Posts: 12 Liked: 3 times
Joined: Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson
Contact:
Post
by decoy5657 » Oct 16, 2013 7:14 pm
this post
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: Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson
Contact:
Post
by decoy5657 » Oct 16, 2013 8:01 pm
1 person likes this post
I just added the -Completely option... so... problem solved.
veremin
Product Manager
Posts: 20413 Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Oct 17, 2013 11:53 am
this post
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.
decoy5657
Influencer
Posts: 12 Liked: 3 times
Joined: Oct 09, 2013 2:45 pm
Full Name: Aaron Anderson
Contact:
Post
by decoy5657 » Oct 17, 2013 1:07 pm
this post
Yes, for this instance, that's what I want to do.
Users browsing this forum: No registered users and 10 guests