Skip to content

Latest commit

 

History

History
220 lines (172 loc) · 5.07 KB

Get-AzureSiteRecoveryJob.md

File metadata and controls

220 lines (172 loc) · 5.07 KB
external help file ms.assetid online version schema
Microsoft.Azure.Commands.RecoveryServicesRdfe.dll-Help.xml
2957C0DE-3A2F-4337-A778-2B95654972E7
2.0.0

Get-AzureSiteRecoveryJob

SYNOPSIS

Gets the operation information for a Site Recovery vault.

[!INCLUDE rdfe-banner]

SYNTAX

ByParam (Default)

Get-AzureSiteRecoveryJob [-StartTime <DateTime>] [-EndTime <DateTime>] [-TargetObjectId <String>]
 [-State <String>] [-Profile <AzureSMProfile>] [<CommonParameters>]

ById

Get-AzureSiteRecoveryJob -Id <String> [-Profile <AzureSMProfile>] [<CommonParameters>]

ByObject

Get-AzureSiteRecoveryJob -Job <ASRJob> [-Profile <AzureSMProfile>] [<CommonParameters>]

DESCRIPTION

The Get-AzureSiteRecoveryJob cmdlet gets Azure Site Recovery jobs. You can use this cmdlet to view the operation information for the current Site Recovery vault.

EXAMPLES

Example 1: Get a job by specifying an ID

PS C:\> Get-AzureSiteRecoveryJob -Id "033785cc-9f72-4f07-8e78-e4d1e942a7ae" 
Name             : SaveRecoveryPlan
ID               : 033785cc-9f72-4f07-8e78-e4d1e942a7ae
ClientRequestId  : d604206b-32e1-4d5b-9a23-32b118d14a1e-2015-02-20 07:20:42Z-P
State            : Succeeded
StateDescription : Completed
StartTime        : 20-02-2015 07:20:45 +05:30
EndTime          : 20-02-2015 07:20:46 +05:30
TargetObjectId   : cfb445bf-fd14-4b5d-b9ac-5154e1415ef2
TargetObjectType : RecoveryPlan
TargetObjectName : RP
AllowedActions   : {Cancel}
Tasks            : {Save a recovery plan task}
Errors           : {}

This command gets the Azure Site Recovery job that has the specified ID.

Example 2: Gets a job based on time

PS C:\> Get-AzureSiteRecoveryJob -StartTime "20-02-2015 01:00:00" -EndTime "21-02-2015 01:00:00"
Name             : SaveRecoveryPlan
ID               : 033785cc-9f72-4f07-8e78-e4d1e942a7ae
ClientRequestId  : d604206b-32e1-4d5b-9a23-32b118d14a1e-2015-02-20 07:20:42Z-P
State            : Succeeded
StateDescription : Completed
StartTime        : 20-02-2015 07:20:45 +05:30
EndTime          : 20-02-2015 07:20:46 +05:30
TargetObjectId   : cfb445bf-fd14-4b5d-b9ac-5154e1415ef2
TargetObjectType : RecoveryPlan
TargetObjectName : RP
AllowedActions   : {Cancel}
Tasks            : {Save a recovery plan task}
Errors           : {}

This command gets Site Recovery jobs that fall between the specified start time and end time.

PARAMETERS

-EndTime

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

Type: DateTime
Parameter Sets: ByParam
Aliases: 

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

-Id

Specifies the ID of a job to get.

Type: String
Parameter Sets: ById
Aliases: 

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

-Job

Specifies a job to get.

Type: ASRJob
Parameter Sets: ByObject
Aliases: 

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type: AzureSMProfile
Parameter Sets: (All)
Aliases: 

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

-StartTime

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

Type: DateTime
Parameter Sets: ByParam
Aliases: 

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

-State

Specifies the input state for a Site Recovery 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
Type: String
Parameter Sets: ByParam
Aliases: 

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

-TargetObjectId

Specifies the ID of the object targeted by the job.

Type: String
Parameter Sets: ByParam
Aliases: 

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Restart-AzureSiteRecoveryJob

Resume-AzureSiteRecoveryJob

Stop-AzureSiteRecoveryJob