Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Remove-VBRJobObject

Short Description

Removes VMs or VM containers from jobs.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Remove-VBRJobObject [-Objects] <CObjectInJob[]> [-Completely] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

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.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Objects

Specifies job objects (VMs and VM containers). The cmdlet will exclude these objects from processing by job.

True

2

True (ByValue,
ByProperty
Name)

False

Completely

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.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

This command removes a 'Fileserver03' VM from the Fileservers Backup Job. The job is obtained with Get-VBRJob; the VM is obtained with Get-VBRJobObject, the result is piped down.

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
----             ----       ----------       --------
Fileserver03     Exclude    117.1 GB         tech.veeam.local...

Example 2

This command completely removes a 'Fileserver03' VM from the Fileservers Backup Job. The job is obtained with Get-VBRJob; the VM is obtained with Get-VBRJobObject, the result is piped down.

The Completely parameter is used.

PS C:\PS> Get-VBRJob -Name "Fileservers Backup Job" | Get-VBRJobObject -Name "Fileserver03" | Remove-VBRJobObject -Completely

Example 3

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

Related Commands

Get-VBRJobObject

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation