This is an archive version of the document. To get the most up-to-date information, see the current version.

Remove-VBRJobObject

In this article

    Short Description

    Removes VMs or VM containers from the specified job.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus

    Syntax

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

    Related Commands

    Get-VBRJobObject

    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) you want to exclude from processing by job.

    True

    2

    True (ByValue, ByProperty
    Name)

    False

    Completely

    If indicated, the job objects will be permanently removed from job.

    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