Start-AzMigrateLocalServerMigration
Starts the migration for the replicating server.
Syntax
ByID (Default)
Start-AzMigrateLocalServerMigration
-TargetObjectID <String>
[-TurnOffSourceServer]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzMigrateLocalServerMigration
-InputObject <IMigrateIdentity>
[-TurnOffSourceServer]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Starts the migration for the replicating server.
Examples
Example 1: Start migration by Id
Start-AzMigrateLocalServerMigration -TargetObjectID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/protectedItems/0ec082d5-6827-457a-bae2-f986e1b94851"
ActivityId : ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.JobModelCustomPropertiesAffectedObjectDetails
DisplayName : Planned failover
EndTime :
Error : {}
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
/replicationVaults/testproj1234replicationvault/jobs/af0e1bf6-e3e6-482c-8345-b1a06d87af96
Name : af0e1bf6-e3e6-482c-8345-b1a06d87af96
ObjectId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
/replicationVaults/testproj1234replicationvault/protectedItems/0ec082d5-6827-457a-bae2-f986e1b94851/plannedFai
lover
ObjectInternalId : a8b5ee68-102c-5aae-9499-c57a475a8fc4
ObjectInternalName : testmachine
ObjectName : 0ec082d5-6827-457a-bae2-f986e1b94851
ObjectType : ProtectedItem
ReplicationProviderId : 4de0fddc-bdfe-40d9-b60e-678bdce89630
SourceFabricProviderId : b35da11c-d69e-4220-9a90-d81ed93ad2fc
StartTime : 8/1/2023 12:42:19 AM
State : Started
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
TargetFabricProviderId : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task : {Prerequisite check, Turning off resource on primary,
Starting failover, Preparing protected entities...}
Type : Microsoft.DataReplication/replicationVaults/jobs
Start AzLocal server migration by Id.
$InputObject = Get-AzMigrateLocalServerReplication -TargetObjectID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication/replicationVaults/testproj1234replicationvault/protectedItems/0ec082d5-6827-457a-bae2-f986e1b94851"
Start-AzMigrateLocalServerMigration -InputObject $InputObject
$InputObject | Start-AzMigrateLocalServerMigration
ActivityId : ActivityId: 00000000-0000-0000-0000-000000000000
AllowedAction : {Cancel}
CustomPropertyAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.JobModelCustomPropertiesAffectedObjectDetails
DisplayName : Planned failover
EndTime :
Error : {}
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
/replicationVaults/testproj1234replicationvault/jobs/af0e1bf6-e3e6-482c-8345-b1a06d87af96
Name : af0e1bf6-e3e6-482c-8345-b1a06d87af96
ObjectId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.DataReplication
/replicationVaults/testproj1234replicationvault/protectedItems/0ec082d5-6827-457a-bae2-f986e1b94851/plannedFai
lover
ObjectInternalId : a8b5ee68-102c-5aae-9499-c57a475a8fc4
ObjectInternalName : testmachine
ObjectName : 0ec082d5-6827-457a-bae2-f986e1b94851
ObjectType : ProtectedItem
ReplicationProviderId : 4de0fddc-bdfe-40d9-b60e-678bdce89630
SourceFabricProviderId : b35da11c-d69e-4220-9a90-d81ed93ad2fc
StartTime : 8/1/2023 12:42:19 AM
State : Started
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
TargetFabricProviderId : 22f00372-a1b7-467f-87ce-d95e17a6e7c7
Task : {Prerequisite check, Turning off resource on primary,
Starting failover, Preparing protected entities...}
Type : Microsoft.DataReplication/replicationVaults/jobs
Start AzLocal server migration by replication input object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: 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
Specifies the replicating server for which migration needs to be initiated.
The server object can be retrieved using the Get-AzMigrateLocalServerReplication cmdlet.
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: IMigrateIdentity
Default value: None
Supports wildcards: False
DontShow: False
ByInputObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Azure Subscription ID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetObjectID
Specifies the replicating server for which migration needs to be initiated.
The ID should be retrieved using the Get-AzMigrateLocalServerReplication cmdlet.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByID
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TurnOffSourceServer
Specifies whether the source server should be turned off post migration.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
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 .
Outputs