Get-AzMigrateHCIJob

Retrieves the status of an Azure Migrate job.

Syntax

Get-AzMigrateHCIJob
   -ResourceGroupName <String>
   -ProjectName <String>
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzMigrateHCIJob
   -ResourceGroupName <String>
   -ProjectName <String>
   [-SubscriptionId <String>]
   -Name <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzMigrateHCIJob
   [-SubscriptionId <String>]
   -ID <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzMigrateHCIJob
   [-SubscriptionId <String>]
   -InputObject <IMigrateIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzMigrateHCIJob
   [-SubscriptionId <String>]
   -ResourceGroupID <String>
   -ProjectID <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

The Get-AzMigrateHCIJob cmdlet retrives the status of an Azure Migrate job.

Examples

Example 1: Get by job Id

Get-AzMigrateHCIJob -ID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a"

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         : WorkflowDetails
DisplayName                        : Delete protected item
EndTime                            :
Error                              : {}
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a
Name                               : 0203aa1b-1dff-4653-89a9-b90a76d1601a
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000001
ObjectInternalId                   : 13436868-1f4c-5d4e-a252-c666179bf4df
ObjectInternalName                 : testmachine1
ObjectName                         : testsite-0000-0000-00000001
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/14/2023 7:09:10 PM
State                              : Started
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               : {Prerequisite check, Deleting protected item}
Type                               : Microsoft.DataReplication/replicationVaults/jobs

Retrieves a job by its Id.

Example 2: Get by job name

Get-AzMigrateHCIJob -ResourceGroupName "test-rg" -ProjectName "testproj" -Name "0203aa1b-1dff-4653-89a9-b90a76d1601a"

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         : WorkflowDetails
DisplayName                        : Delete protected item
EndTime                            :
Error                              : {}
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a
Name                               : 0203aa1b-1dff-4653-89a9-b90a76d1601a
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000001
ObjectInternalId                   : 13436868-1f4c-5d4e-a252-c666179bf4df
ObjectInternalName                 : testmachine1
ObjectName                         : testsite-0000-0000-00000001
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/14/2023 7:09:10 PM
State                              : Started
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               : {Prerequisite check, Deleting protected item}
Type                               : Microsoft.DataReplication/replicationVaults/jobs

Retrieves a job by its name.

Example 3: Get by job input object

$InputObject = Get-AzMigrateHCIJob -ID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a"

Get-AzMigrateHCIJob -InputObject $InputObject

$InputObject | Get-AzMigrateHCIJob

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         : WorkflowDetails
DisplayName                        : Delete protected item
EndTime                            :
Error                              : {}
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a
Name                               : 0203aa1b-1dff-4653-89a9-b90a76d1601a
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000001
ObjectInternalId                   : 13436868-1f4c-5d4e-a252-c666179bf4df
ObjectInternalName                 : testmachine1
ObjectName                         : testsite-0000-0000-00000001
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/14/2023 7:09:10 PM
State                              : Started
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               : {Prerequisite check, Deleting protected item}
Type                               : Microsoft.DataReplication/replicationVaults/jobs

Retrieves a job by the job itself as an input object.

Example 4: List by resource group Id and project Id.

Get-AzMigrateHCIJob -ResourceGroupID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg" -ProjectID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.Migrate/MigrateProjects/testproj"

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         : WorkflowDetails
DisplayName                        : Delete protected item
EndTime                            :
Error                              : {}
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a
Name                               : 0203aa1b-1dff-4653-89a9-b90a76d1601a
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000001
ObjectInternalId                   : 13436868-1f4c-5d4e-a252-c666179bf4df
ObjectInternalName                 : testmachine1
ObjectName                         : testsite-0000-0000-00000001
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/14/2023 7:09:10 PM
State                              : Started
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               : {Prerequisite check, Deleting protected item}
Type                               : Microsoft.DataReplication/replicationVaults/jobs

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         :
DisplayName                        : Planned failover
EndTime                            : 8/11/2023 10:09:18 PM
Error                              :
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/f2ebb932-fa4a-47a7-b1fa-ff5aa877d5ed
Name                               : f2ebb932-fa4a-47a7-b1fa-ff5aa877d5ed
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000000/plannedFailover
ObjectInternalId                   : 4ef231a3-0774-5e44-8317-bed903d297a2
ObjectInternalName                 : testmachine2
ObjectName                         : testsite-0000-0000-00000000
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/11/2023 9:53:48 PM
State                              : Succeeded
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               :
Type                               : Microsoft.DataReplication/replicationVaults/jobs

Retrieves all the jobs from a project in some resource group by Ids.

Example 5: List by resource group name and project name.

Get-AzMigrateHCIJob -ResourceGroupName "test-rg" -ProjectName "testproj"

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         : WorkflowDetails
DisplayName                        : Delete protected item
EndTime                            :
Error                              : {}
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/0203aa1b-1dff-4653-89a9-b90a76d1601a
Name                               : 0203aa1b-1dff-4653-89a9-b90a76d1601a
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000001
ObjectInternalId                   : 13436868-1f4c-5d4e-a252-c666179bf4df
ObjectInternalName                 : testmachine1
ObjectName                         : testsite-0000-0000-00000001
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/14/2023 7:09:10 PM
State                              : Started
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               : {Prerequisite check, Deleting protected item}
Type                               : Microsoft.DataReplication/replicationVaults/jobs

ActivityId                         :  ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction                      : {}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelCustomPropertiesAffectedObjectDetails
CustomPropertyInstanceType         :
DisplayName                        : Planned failover
EndTime                            : 8/11/2023 10:09:18 PM
Error                              :
Id                                 : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/jobs/f2ebb932-fa4a-47a7-b1fa-ff5aa877d5ed
Name                               : f2ebb932-fa4a-47a7-b1fa-ff5aa877d5ed
ObjectId                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
                                     /replicationVaults/testproj1234replicationvault/protectedItems/testsite-0000-0000-00000000/plannedFailover
ObjectInternalId                   : 4ef231a3-0774-5e44-8317-bed903d297a2
ObjectInternalName                 : testmachine2
ObjectName                         : testsite-0000-0000-00000000
ObjectType                         : ProtectedItem
ReplicationProviderId              : 0a870516-56c7-4460-998c-f267bd579f16
SourceFabricProviderId             : a2793d98-d4f1-427f-a5a6-2d694f4a1bf7
StartTime                          : 8/11/2023 9:53:48 PM
State                              : Succeeded
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview.WorkflowModelTags
TargetFabricProviderId             : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task                               :
Type                               : Microsoft.DataReplication/replicationVaults/jobs

Retrieves all the jobs from a project in some resource group by names.

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

-ID

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

-InputObject

Specifies the job object of the replicating server. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

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

-Name

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

Inputs

IMigrateIdentity

Outputs

IWorkflowModel