Removes VMs or VM containers from jobs.
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus
Remove-VBRJobObject [-Objects] <CObjectInJob> [-Completely] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]
This cmdlet allows you to remove VMs or VM containers from existing backup, replication or copy job.
You can remove the objects from job completely or only exclude them from processing.
- If you remove the objects completely, they are deleted from job settings and from Veeam database. Run the cmdlet with the Completely parameter for this.
- If you run the cmdlet without the Completely parameter, the job objects are only excluded from processing but remain in job settings.
Note that Veeam PowerShell does not allow you to include the excluded objects back to the job, you can do it only with UI.
Specifies job objects (VMs and VM containers). The cmdlet will exclude these objects from processing by job.
If set to True, the cmdlet will permanently remove the objects from the job.
If set to False, the cmdlet will exclude the objects from processing.
This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
PS C:\PS> Get-VBRJob -Name "Fileservers Backup Job" | Get-VBRJobObject -Name "Fileserver03" | Remove-VBRJobObject
You can check the VM state by running Get-VBRJobObject again.
PS C:\PS> Get-VBRJob -Name "Fileservers Backup Job" | Get-VBRJobObject -Name "Fileserver03"
Name Type ApproxSize Location
The Completely parameter is used.
PS C:\PS> Get-VBRJob -Name "Fileservers Backup Job" | Get-VBRJobObject -Name "Fileserver03" | Remove-VBRJobObject -Completely
This command removes Fileserver03 and Fileserver04 VMs from the Fileservers Backup Job.
- The job is obtained with Get-VBRJob and assigned to the '$backupjob' variable.
- The VMs in job are obtained with Get-VBRJobObject and assigned to the '$jobobject' variable.
PS C:\PS> $backupjob = Get-VBRJob -Name "Fileservers Backup Job"
PS C:\PS> $jobobject = Get-VBRJobObject -Job $backupjob -Name "Fileserver03", "Fileserver04"
PS C:\PS> Remove-VBRJobObject -Objects $jobobject