你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Remove-AzMigrateServerReplication

停止迁移服务器的复制。

语法

Remove-AzMigrateServerReplication
      -TargetObjectID <String>
      [-SubscriptionId <String>]
      [-ForceRemove <String>]
      [-DefaultProfile <PSObject>]
      [<CommonParameters>]
Remove-AzMigrateServerReplication
      -InputObject <IMigrationItem>
      [-SubscriptionId <String>]
      [-ForceRemove <String>]
      [-DefaultProfile <PSObject>]
      [<CommonParameters>]

说明

Remove-AzMigrateServerReplication cmdlet 停止迁移服务器的复制。

示例

示例 1:按 ID 删除。

Remove-AzMigrateServerReplication -TargetObjectID "/Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f"

ActivityId                       : da958651-96b3-4e65-a41e-897d4b06f7dd ActivityId: 3a4c8d4d-920a-47cd-82c3-f3dcce90a588
AllowedAction                    : {Cancel}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType         : AsrJobDetails
EndTime                          :
Error                            : {}
FriendlyName                     : Disable
Id                               : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
                                   yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/931dde9a-de67-4a30-a045-bb9d6162f8ab
Location                         :
Name                             : 931dde9a-de67-4a30-a045-bb9d6162f8ab
ScenarioName                     : Disable
StartTime                        : 9/25/20 9:20:08 PM
State                            : InProgress
StateDescription                 : InProgress
TargetInstanceType               : ProtectionEntity
TargetObjectId                   : 101883a0-23f7-538a-bbd5-6d8b4fa900e2
TargetObjectName                 : prsadhu-TestVM
Task                             : {DisableProtectionOnPrimary, UpdateDraState}
Type                             : Microsoft.RecoveryServices/vaults/replicationJobs

按 ID 重新同步。

示例 2:按输入对象删除

$obj = Get-AzMigrateServerReplication -TargetObjectID "/Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f"
Remove-AzMigrateServerReplication -InputObject $obj

ActivityId                       : da958651-96b3-4e65-a41e-897d4b06f7dd ActivityId: 3a4c8d4d-920a-47cd-82c3-f3dcce90a588
AllowedAction                    : {Cancel}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType         : AsrJobDetails
EndTime                          :
Error                            : {}
FriendlyName                     : Disable
Id                               : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
                                   yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/931dde9a-de67-4a30-a045-bb9d6162f8ab
Location                         :
Name                             : 931dde9a-de67-4a30-a045-bb9d6162f8ab
ScenarioName                     : Disable
StartTime                        : 9/25/20 9:20:08 PM
State                            : InProgress
StateDescription                 : InProgress
TargetInstanceType               : ProtectionEntity
TargetObjectId                   : 101883a0-23f7-538a-bbd5-6d8b4fa900e2
TargetObjectName                 : prsadhu-TestVM
Task                             : {DisableProtectionOnPrimary, UpdateDraState}
Type                             : Microsoft.RecoveryServices/vaults/replicationJobs

按名称。

参数

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-ForceRemove

指定是否需要强制删除复制。

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

-InputObject

指定复制服务器的计算机对象。 若要构造,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。

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

-SubscriptionId

Azure 订阅 ID。

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False

-TargetObjectID

指定要对其禁用副本的重新分配服务器。 应使用 Get-AzMigrateServerReplication cmdlet 检索 ID。

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

输出

IJob

备注

别名

复杂参数属性

若要创建下面所述的参数,请构造包含相应属性的哈希表。 有关哈希表的信息,请运行Get-Help about_Hash_Tables。

INPUTOBJECT <IMigrationItem>:指定复制服务器的计算机对象。

  • [Location <String>]:资源位置
  • [ProviderSpecificDetail <IMigrationProviderSpecificSettings>]:迁移提供程序自定义设置。