Remove-VBRJobObject

In this article

    Short Description

    Removes VMs or VM containers from jobs.

    Applies to

    Platform: VMware, Hyper-V

    Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

    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 on common parameters, see the About CommonParameters section of Microsoft Docs.

    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.

    Get-VBRJob -Name "Fileservers Backup Job" | Get-VBRJobObject -Name "Fileserver03" | Remove-VBRJobObject

    You can check the VM state by running Get-VBRJobObject again.

    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.

    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.

    $backupjob = Get-VBRJob -Name "Fileservers Backup Job"

    $jobobject = Get-VBRJobObject -Job $backupjob -Name "Fileserver03", "Fileserver04"

    Remove-VBRJobObject -Objects $jobobject

    Related Commands

    Get-VBRJobObject

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.