Administering Hyper-V SureBackup Job

In this article

    This example shows how to set us a SureBackup job for verifying a Microsoft Exchange server backups. The SureBackup job will use an application group containing the DC and the DNS server and a linked job that backs up the Microsoft Exchange server. The virtual lab and the application group are created in the previous sections: Working with Hyper-V Virtual Lab and Working with Hyper-V Application Group. The SureBackup job will be scheduled to run after the backup job.

    Create a SureBackup Job

    To create a SureBackup job, you will need to perform the following steps:

    1. Get the 'Microsoft Exchange Vlab' virtual lab with Get-VSBHvVirtualLab and assign it to a variable.
    2. Get the 'Production Application Group' application group with Get-VSBApplicationGroup and assign it to a variable.
    3. Get the 'Microsoft Exchange Server Backup' backup job with Get-VBRJob and assign it to a variable.
    4. Create the SureBackup job with Add-VSBHvJob. Set the virtual lab, the application group and the linked job using the created variables.
    5. Configure a job schedule using Set-VSBJobSchedule. Set it to run after the 'Microsoft Exchange Server Backup' backup job backup job.

    // Get the virtual lab:

    $vlab = Get-VSBHvVirtualLab -Name "Microsoft Exchange Vlab"

     

    // Get the application group:

    $appgroup = Get-VSBApplicationGroup -Name "Production Application Group"

     

    // Get the backup job:

    $backupjob = Get-VBRJob -Name "Microsoft Exchange Server Backup"

     

    // Get the backup job and create the SureBackup job:

    Add-VSBHvJob -Name "Microsoft Exchange Verification" -VirtualLab $vlab -AppGroup $appgroup -LinkedJob $backupjob

     

    // Get the application group:

    Get-VSBJob -Name "Microsoft Exchange Verification" | Set-VSBJobSchedule -After -AfterJob $backupjob

    Look for the SureBackup Job

    Run Get-VSBJob to get the created SureBackup job.

    Get-VSBJob -Name "Microsoft Exchange Verification"

    Remove the SureBackup Job

    Run Remove-VSBJob to remove the SureBackup job.

    Get-VSBJob -Name "Microsoft Exchange Verification"| Remove-VSBJob