PowerShell script exchange
Post Reply
pirx
Veteran
Posts: 663
Liked: 99 times
Joined: Dec 20, 2015 6:24 pm
Contact:

exclude disks of Individual VMs

Post by pirx »

Follow up to my question on how to find VM/disk excluded.

For MSSQL server we exclude disks 3,4,5 (SCSI 0:3-0:5). I want to automate this but all examples I could find seem to require that the VM itself is added to the job, where we either add a cluster or based on tags. I would need to feed the script the VM name and the job name. Or just all jobs in case a VM is moved, which currently screws up excludes as they only cover the cluster the VM is currently running in...

I found https://www.robvit.com/veeam/backup_rep ... owershell/

But this seems to set excludes for every object in a job. I tried to filter on $jobobject but the VM itself is not an object, its the cluster.
david.domask
Veeam Software
Posts: 3083
Liked: 711 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: exclude disks of Individual VMs

Post by david.domask »

Hi pirx,

There's no supported means of setting disk exclusions via Powershell -- I've not played with the unsupported methods in the blog post you found and I would not rely on these as eventually we want to close out use of unsupported .NET methods / .NET reflection, so eventually your script will break.

Probably, you'll need to write some code with Invoke-WebRequest to call the VBR API which lets you set disk inclusion / exclusions per job. I don't have an example to share at the moment but it should be pretty straight forward.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests