Get-AzRecoveryServicesBackupJobDetail

Gets details for a Backup job.

Syntax

Get-AzRecoveryServicesBackupJobDetail
   [-Job] <JobBase>
   [-UseSecondaryRegion]
   [-VaultLocation <String>]
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesBackupJobDetail
   [-JobId] <String>
   [-UseSecondaryRegion]
   [-VaultLocation <String>]
   [-VaultId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzRecoveryServicesBackupJobDetail cmdlet gets Azure Backup job details for a specified job. Set the vault context by using the -VaultId parameter.

Warning: Get-AzRecoveryServicesBackupJobDetails alias will be removed in a future breaking change release.

Examples

Example 1: Get Backup job details for failed jobs

$vault = Get-AzRecoveryServicesVault -ResourceGroupName "resourceGroup" -Name "vaultName"
$Jobs = Get-AzRecoveryServicesBackupJob -Status Failed -VaultId $vault.ID
$JobDetails = Get-AzRecoveryServicesBackupJobDetail -Job $Jobs[0] -VaultId $vault.ID
$JobDetails.ErrorDetails

The first command fetches the relevant vault. The second command gets an array of failed jobs in the vault, and then stores them in the $Jobs array. The third command gets the job details for the 1st failed job in $Jobs, and then stores them in the $JobDetails variable. The final command displays error details for the failed jobs.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Job

Specifies the job to get. To obtain a BackupJob object, use the Get-AzRecoveryServicesBackupJob cmdlet.

Type:JobBase
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobId

Specifies the ID of a Backup job. The ID is the JobId property of a Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.JobBase object.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UseSecondaryRegion

Filters from Secondary Region for Cross Region Restore

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VaultId

ARM ID of the Recovery Services Vault.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VaultLocation

Location of the Recovery Services Vault used to fetch the secondary region jobs.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

JobBase