Add and Remove VM’s from CSV to Veeam jobs using Powershell

Hi All,

I am in process of veeam jobs consolidation, this task requires me moving many Virtual Machines to different jobs from certain CSV file, adding and removing, as you can guess, we can do either manually or using Powershell,  So, I am going to show you how to Add and Remove VM’s from CSV to Veeam jobs using Powershell, especially  it helps us when we’re talking about hundreds of virtual machines.

  • – verifying different account per VM.
  • – verifying application aware changes.

Login to Veeam server and open Powershell ISE as Administrator mode.

  • – Add VM’s from CSV to exciting job#ConnectToVeeam:
$backup  = Import-csv "C:\Users\MeirP\Desktop\Veeam_AddTier1\80VM_Tier1.csv"
$job = "JobName"

Add-VBRViJobObject -Job $job -Entities (Find-VBRViEntity -name $backup.vm)
  • Remove VMs’ from CSV on specific job
Add-PSSnapin VeeamPSSnapin Connect-VBRServer -Server %VeeamServer% $backup = import-csv "C:\Users\MeirP\Desktop\Veeam_AddTier1\80VM_Tier1.csv" $job = "JobName" Foreach ($vm in $backup.vm) { Get-VBRJob -Name $job | Get-VBRJobObject -Name $vm | Remove-VBRJobObject }