Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Get-AzureSiteRecoveryJob

Get-AzureSiteRecoveryJob

microsoft.azure.commands.recoveryservices.dll

Synopsis

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

Syntax

Get-AzureSiteRecoveryJob [-Id] [<CommonParameters>]

Get-AzureSiteRecoveryJob [-Job] [<CommonParameters>]

Get-AzureSiteRecoveryJob [-EndTime] [-StartTime] [-State] [-TargetObjectId] [<CommonParameters>]

Detailed Description

Get the information of the operation for current Azure Site Recovery Vault.

Parameters

-EndTime <DateTime>

Specifies a end time as a DateTime object. This cmdlet gets jobs that ends after the time that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Id <string>

Specifies the ID of a job to get.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Job <ASRJob>

Specifies an Azure Site Recovery job object to get.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-StartTime <DateTime>

Specifies a start time as a DateTime object. This cmdlet gets jobs that begin after the time that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-State <string>

Specifies an input state for an Azure Site Recovery job. This cmdlet gets jobs that match the state that this parameter specifies.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-TargetObjectId <string>

ID of the object on which Job was targeted to.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS>

Description

-----------

Get-AzureSiteRecoveryJob -Id d0b56c01-1fd7-411a-94e9-be717ac6601e

ID               : d0b56c01-1fd7-411a-94e9-be717ac6601e
ClientRequestId  : 0d259706-7882-4614-81bf-7d155f3600cb-2014-10-06 09:40:26Z
State            : Succeeded
StateDescription : Completed
StartTime        : 10/6/2014 9:40:28 AM
EndTime          : 10/6/2014 9:40:30 AM
AllowedActions   : {Cancel, Restart}
Name             : Remove classification configuration
Tasks            : {Prerequisites check for unpairing classifications, Unpairing classifications}
Errors           : {}                        

-------------------------- EXAMPLE 2 --------------------------

C:\PS>

Description

-----------

Provide the DateTime object in UTC as input to StartTime and EndTime parameter.

$StartTime = Get-Date "2015-02-20 06:10:03Z"
$EndTime = Get-Date "2015-02-20 06:20:03Z"
Get-AzureSiteRecoveryJob -StartTime $StartTime -EndTime $EndTime

Name             : SaveRecoveryPlan
ID               : 5d6389f7-3f08-48d6-9d2c-e4a4aed36a0b
ClientRequestId  : bc4b291d-4722-419e-a7a3-7a58674c35a3-2015-02-20 06:14:03Z
State            : Succeeded
StateDescription : Completed
StartTime        : 2/20/2015 6:14:04 AM
EndTime          : 2/20/2015 6:14:05 AM
TargetObjectId   : 2d11e8be-29b8-4152-a8b9-2a6a9304537a
TargetObjectType : RecoveryPlan
TargetObjectName : TestRP
AllowedActions   :
Tasks            : {Save a recovery plan task}
Errors           : {}