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

Add-VSBHvJob

In this article

    Short Description

    Creates a Hyper-V SureBackup job.

    Applies to

    Platform: Hyper-V

    For VMware, run Add-VSBJob.

    Product Edition: Enterprise, Enterprise Plus

    Syntax

    Add-VSBHvJob [-Name <String>] -VirtualLab <CHvSbVirtualLab> [-AppGroup <CSbAppGroup>] [-LinkedJob <CBackupJob[]>] [-Description <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

    Related Commands

    Get-VSBHvVirtualLab

    Get-VSBApplicationGroup

    Get-VBRJob

    Detailed Description

    This cmdlet adds a new Hyper-V SureBackup job.

    You can use a linked job to bring the target VM(s) to the job, or an application group containing the required VMs, or a combination of both according to your virtual infrastructure objectives.

    Note that when you create a SureBackup job, you need to run it manually unless you enable a job schedule.

    Run Start-VSBJob to start the created SureBackup job.

    Run Set-VSBJobScheduleOptions to set schedule for the SureBackup job.

    Parameters

    Parameter

    Description

    Required

    Position

    Accept
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    Name

    Specifies the name you want to assign to the SureBackup job.

    False

    Named

    False

    False

    VirtualLab

    Specifies the virtual lab you want to use for verification.

    True

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    AppGroup

    Specifies the application group you want to use to provide the copy of the production environment of the verified VM.

    If you do not use an application group, make sure that the -LinkedJob parameter is set.

    False

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    LinkedJob

    Specifies the backup, replication or copy job containing the VM you want to verify.

    If you do not use a linked backup job, make sure that the -AppGroup parameter is set.

    You can assign multiple backup jobs to this object.

    False

    Named

    True (ByValue,
    ByProperty
    Name)

    False

    Description

    Specifies the description of the new SureBackup 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 creates a new Sure Backup job named "Exchange SureJob" using a virtual lab, an application group and a linked job. The VM to verify is obtained by searching for the backup job named "Exchange Backup Job" with Get-VBRJob, and piped down. The virtual lab and the application group objects are obtained with Get-VSBHvVirtualLab and Get-VSBApplicationGroup and assigned to $VLab01 and $"Exchange Appgroup" variables accordingly beforehand.

    PS C:\PS> Get-VBRJob -Name "Exchange Backup Job" | Add-VSBHvJob -Name "Exchange SureJob" -VirtualLab $VLab01 -AppGroup $"Exchange Appgroup"

    Example 2

    This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab, an application group and a linked job. The virtual lab and application group objects are obtained with Get-VSBHvVirtualLab and Get-VSBApplicationGroup and assigned to $VLab01 and $"Exchange Appgroup" variables accordingly beforehand.

    PS C:\PS> Add-VSBHvJob -Name "Exchange SureJob" -VirtualLab $VLab01 -AppGroup $"Exchange Appgroup"

    Example 3

    This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab and an application group. The virtual lab object is obtained with Get-VSBHvVirtualLab and piped down. The VM to verify is included into the application group, the application group object is obtained with Get-VSBApplicationGroup and assigned to the $"Exchange Appgroup" variable beforehand.

    PS C:\PS> Get-VSBHvVirtualLab -Name "Exchange VLab 01" | Add-VSBHvJob -Name "Exchange SureJob" -AppGroup $"Exchange Appgroup"

    Example 4

    This command creates a new Sure Backup job named "Exchange SureJob" using a virtual lab and a linked job. The virtual lab object is obtained with Get-VSBHvVirtualLab and assigned to $VLab01 variable beforehand. The VM to verify is obtained with Get-VBRJob and assigned to the $"Exchange Backup" variable beforehand.

    PS C:\PS> Add-VSBHvJob -Name "Exchange SureJob" -VirtualLab $VLab01 -LinkedJob $"Exchange Backup"