Hi there,
we are backing up our VM's with tags from two sites. So every VM that I backup can be in a few different backups jobs.
I am looking for the powershell script which allows me to remove virtualmachine$ from every backup source.
Currently I have to specify in which job the VM resides. I dont want to do that. Each VM is in only one job so I would like to automate this task with our VM decommission script.
Can someone help me realise this?
-
- Influencer
- Posts: 13
- Liked: never
- Joined: Jan 07, 2019 11:22 am
- Full Name: Jelle Kamma
- Contact:
-
- Veeam Software
- Posts: 2590
- Liked: 606 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Oneliner to remove VM from every backup job
Heya @jellekamma,
If you're on v12, use Global Exclusions:
https://helpcenter.veeam.com/docs/backu ... on&ver=120
You don't need to set it for each job
Doing it per job isn't really a one-liner thing, and since you're using Tags, I'm not sure it's possible since you need to do it a little funny as I remember, and it's slightly more funny with Tags in the mix, since you can't transverse hierarchy objects like tags with Powershell.
I can likely figure it out for you later if necessary (traveling today), but see if Global Exclusions solve your issue for you.
If you're on v12, use Global Exclusions:
https://helpcenter.veeam.com/docs/backu ... on&ver=120
You don't need to set it for each job

Doing it per job isn't really a one-liner thing, and since you're using Tags, I'm not sure it's possible since you need to do it a little funny as I remember, and it's slightly more funny with Tags in the mix, since you can't transverse hierarchy objects like tags with Powershell.
I can likely figure it out for you later if necessary (traveling today), but see if Global Exclusions solve your issue for you.
David Domask | Product Management: Principal Analyst
-
- Influencer
- Posts: 13
- Liked: never
- Joined: Jan 07, 2019 11:22 am
- Full Name: Jelle Kamma
- Contact:
Re: Oneliner to remove VM from every backup job
Hi, thanks for your answer, I dont need to stop the backup with excluding the VM, I really need it to be deleted due to compliance issues.
-
- Veeam Software
- Posts: 2590
- Liked: 606 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Oneliner to remove VM from every backup job
Hi @jellekamma,
Just to make sure I get it right, your goals are:
1. Ensure that specific VMs are not backed up due to compliance reasons
2. Delete all existing backups of said VM for compliance reasons
Am I correct?
Please confirm, as there are ways to do this, but it will be a bit of code (not going to be a one liner likely if you need to be thorough, which I imagine compliance reasons requires).
Just to make sure I get it right, your goals are:
1. Ensure that specific VMs are not backed up due to compliance reasons
2. Delete all existing backups of said VM for compliance reasons
Am I correct?
Please confirm, as there are ways to do this, but it will be a bit of code (not going to be a one liner likely if you need to be thorough, which I imagine compliance reasons requires).
David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: No registered users and 18 guests