Get-AzMigrateJob
Retrieves the status of an Azure Migrate job.
Syntax
Get-AzMigrateJob
-ResourceGroupName <String>
-ProjectName <String>
[-SubscriptionId <String>]
[-Filter <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMigrateJob
-ResourceGroupName <String>
-ProjectName <String>
[-SubscriptionId <String>]
-JobName <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMigrateJob
[-SubscriptionId <String>]
-JobID <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMigrateJob
[-SubscriptionId <String>]
-InputObject <IJob>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMigrateJob
[-SubscriptionId <String>]
-ResourceGroupID <String>
-ProjectID <String>
[-Filter <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
The Get-AzMigrateJob cmdlet retrives the status of an Azure Migrate job.
Examples
Example 1: Get By Job Id
Get-AzMigrateJob -JobID "/Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b"
ActivityId : 68af14b4-46ae-48d1-b3e9-cdcffb9e8a93 ActivityId: 74d1a396-1d37-4264-8a5b-b727aaef0171
AllowedAction : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType : AsrJobDetails
EndTime : 9/16/20 11:57:33 AM
Error : {}
FriendlyName : Associate replication policy
Id : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b
Location :
Name : 997e2a92-5afe-49c7-a81a-89660aec9b7b
ScenarioName : AssociateProtectionProfile
StartTime : 9/16/20 11:57:32 AM
State : Succeeded
StateDescription : Completed
TargetInstanceType : ProtectionProfile
TargetObjectId : 42752b89-5fad-52fd-bf93-679fbdb6fed9
TargetObjectName : migrateAzMigratePWSHTc8d1sitepolicy
Task : {CloudPairingPrerequisitesCheck, CloudPairingPrepareSite}
Type : Microsoft.RecoveryServices/vaults/replicationJobs
This retrieves a job by it's Id.
Example 2: List by resource group and project
Get-AzMigrateJob -ResourceGroupName 'azmigratepwshtestasr13072020' -ProjectName 'AzMigrateTestProjectPWSH'
ActivityId :
AllowedAction : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType :
EndTime : 9/21/20 4:13:40 PM
Error : {}
FriendlyName : Update the virtual machine
Id : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/1c89e38e-34ec-4903-aa7c-115201bf2de1
Location :
Name : 1c89e38e-34ec-4903-aa7c-115201bf2de1
ScenarioName : UpdateVmProperties
StartTime : 9/21/20 4:13:34 PM
State : Succeeded
StateDescription : Completed
TargetInstanceType : ProtectionEntity
TargetObjectId : 593b735d-2a34-53b2-b8ed-e33da5650703
TargetObjectName : rb-w2k12r2-1
Task : {}
Type : Microsoft.RecoveryServices/vaults/replicationJobs
This gets all jobs in a project.
Example 3: Get by resource group, project and job name
Get-AzMigrateJob -ResourceGroupName 'azmigratepwshtestasr13072020' -ProjectName 'AzMigrateTestProjectPWSH' -JobName 7ae1ee7c-442c-499d-8b0e-81d52a42b71e
ActivityId : 6986b7e5-0f1f-49d8-8b4b-77e6f66bcb92 ActivityId: eb73c6a1-7c66-469f-a853-d896aa38cc0f
AllowedAction : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType : AsrJobDetails
EndTime : 8/21/20 6:41:48 AM
Error : {}
FriendlyName : Create replication policy
Id : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/7ae1ee7c-442c-499d-8b0e-81d52a42b71e
Location :
Name : 7ae1ee7c-442c-499d-8b0e-81d52a42b71e
ScenarioName : AddProtectionProfile
StartTime : 8/21/20 6:41:48 AM
State : Succeeded
StateDescription : Completed
TargetInstanceType : ProtectionProfile
TargetObjectId : 18b2ccec-e39a-517b-ae5d-dd395e9f4f96
TargetObjectName : samplePolicy3
Task : {AddProtectionProfilePreflightsCheckTask, AddProtectionProfileTask}
Type : Microsoft.RecoveryServices/vaults/replicationJobs
This gets a specific job.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Filter
OData filter options.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specifies the job object of the replicating server. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IJob |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobID
Specifies the job id for which the details needs to be retrieved.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobName
Job identifier
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProjectID
Specifies the Azure Migrate Project in which servers are replicating.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProjectName
The name of the migrate project.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupID
Specifies the Resource Group of the Azure Migrate Project in the current subscription.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group where the recovery services vault is present.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Azure Subscription ID.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Azure PowerShell