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

Start-AzureSiteRecoveryProtectionProfileDissociationJob

在与 Site Recovery 保护容器关联的复制策略上启动取消关联作业。

注意

本文档中引用的 cmdlet 用于管理使用服务管理 API 的旧式 Azure 资源。 若要了解用于管理 Azure 资源管理器资源的 cmdlet,请参阅 Az PowerShell 模块

语法

Start-AzureSiteRecoveryProtectionProfileDissociationJob
     -ProtectionProfile <ASRProtectionProfile>
     -PrimaryProtectionContainer <ASRProtectionContainer>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryProtectionProfileDissociationJob
     -ProtectionProfile <ASRProtectionProfile>
     -PrimaryProtectionContainer <ASRProtectionContainer>
     -RecoveryProtectionContainer <ASRProtectionContainer>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]

说明

Start-AzureSiteRecoveryProtectionProfileDissociationJob cmdlet 在与 Azure Site Recovery 保护容器关联的复制策略上启动取消关联作业。

示例

示例 1:取消关联保护配置文件

PS C:\> $ProtectionContainer01 = Get-AzureSiteRecoveryProtectionContainer -Id "5ba2ea95-856d-4033-9ca3-91e3e2c080b9"
PS C:\> $ProtectionContainer02 = Get-AzureSiteRecoveryProtectionContainer -Id "cf011f2a-aa19-443c-9f60-357f6b8afb77"
PS C:\> Start-AzureSiteRecoveryProtectionProfileDissociationJob -PrimaryProtectionContainer $ProtectionContainer01 -ProtectionProfile $ProtectionContainer01.AvailableProtectionProfiles[0] -RecoveryProtectionContainer $ProtectionContainer02
Name             : MyProtectionProfile
ID               : 51978b0f-9241-4153-9171-2e19344f0805
ClientRequestId  : bb6f3200-b7c6-4c6f-bcbc-a70bb9946f03-2015-01-30 02:55:55Z-P
State            : NotStarted
StateDescription : NotStarted
StartTime        : 
EndTime          : 
AllowedActions   : 
Tasks            : {}
Errors           : {}

第一个命令使用 Get-AzureSiteRecoveryProtectionContainer cmdlet 获取保护容器,然后将该容器存储在 $ProtectionContainer 01 变量中。

第二个命令获取保护容器,然后将其存储在 $ProtectionContainer 02 变量中。

最后一个命令将保护配置文件与存储在 $ProtectionContainer 01 中的容器取消关联为主要保护容器。 该命令将存储在 $ProtectionContainer 02 中的容器取消关联为恢复保护容器。

参数

-PrimaryProtectionContainer

指定主保护容器。

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

-Profile

指定此 cmdlet 从中读取的 Azure 配置文件。 如果未指定配置文件,此 cmdlet 将从本地默认配置文件中读取。

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

-ProtectionProfile

指定要与保护容器取消关联的保护配置文件设置。 指定要应用于保护容器的保护配置文件设置。 若要获取 ASRProtectionProfile 对象,请使用 New-AzureSiteRecoveryProtectionProfileObject cmdlet。

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

-RecoveryProtectionContainer

指定恢复保护容器。

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