Edit

Share via


Get-AzRecoveryServicesBackupJobDetail

Gets details for a Backup job.

Syntax

JobFilterSet (Default)

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

IdFilterSet

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.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Job

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

Parameter properties

Type:JobBase
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

JobFilterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

IdFilterSet
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseSecondaryRegion

Filters from Secondary Region for Cross Region Restore

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VaultId

ARM ID of the Recovery Services Vault.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VaultLocation

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

JobBase