Edit

Share via


Get-AzRecoveryServicesAsrJob

Gets the details of the specified ASR job or the list of recent ASR jobs in the Recovery Services vault.

Syntax

ByParam (Default)

Get-AzRecoveryServicesAsrJob
    [-StartTime <DateTime>]
    [-EndTime <DateTime>]
    [-TargetObjectId <String>]
    [-State <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByName

Get-AzRecoveryServicesAsrJob
    -Name <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByObject

Get-AzRecoveryServicesAsrJob
    -Job <ASRJob>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzRecoveryServicesAsrJob cmdlet gets Azure Site Recovery jobs. You can use this cmdlet to view the ASR jobs in the Recovery Services vault.

Examples

Example 1

$jobs = Get-AzRecoveryServicesAsrJob -TargetObjectId $ASRObjectId

Returns all the jobs on a particular ASR object(reference the ASR object such as replicated item or recovery plan by its ID.)

Example 2

Gets the details of the specified ASR job or the list of recent ASR jobs in the Recovery Services vault. (autogenerated)

Get-AzRecoveryServicesAsrJob -Job $Job

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

-EndTime

Specifies the end time for the jobs. This cmdlet gets all jobs that started before the specified time. To obtain a DateTime object for this parameter, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

Parameter properties

Type:

Nullable<T>[DateTime]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Job

Specifies the ASR job object to get updated details for.

Parameter properties

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

Parameter sets

ByObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specify the ASR job by name.

Parameter properties

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

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StartTime

Specifies the start time for the jobs. This cmdlet gets all jobs that started after the specified time.

Parameter properties

Type:

Nullable<T>[DateTime]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-State

Specifies the state for a ASR job. This cmdlet gets all jobs that match the specified state. The acceptable values for this parameter are:

  • NotStarted
  • InProgress
  • Succeeded
  • Other
  • Failed
  • Cancelled
  • Suspended

Parameter properties

Type:String
Default value:None
Accepted values:NotStarted, InProgress, Succeeded, Other, Failed, Cancelled, Suspended
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TargetObjectId

Specifies the ID of the object. Used to search for jobs on the specified object.

Parameter properties

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

Parameter sets

ByParam
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

ASRJob

Outputs

ASRJob