你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Start-AzureSiteRecoveryProtectionProfileDissociationJob
在与 Site Recovery 保护容器关联的复制策略上启动取消关联作业。
注意
本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧 Azure 资源。 创建新的资源时,不建议使用此旧版 PowerShell 模块,因为 ASM 计划停用。 有关详细信息,请参阅 Azure Service Manager 停用。
Az PowerShell 模块是推荐的 PowerShell 模块,用于使用 PowerShell 管理 Azure 资源管理器 (ARM) 资源。
语法
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
指定主保护容器。
类型: | ASRProtectionContainer |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Profile
指定此 cmdlet 从中读取的 Azure 配置文件。 如果未指定配置文件,此 cmdlet 将从本地默认配置文件中读取。
类型: | AzureSMProfile |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ProtectionProfile
指定要与保护容器取消关联的保护配置文件设置。 指定要应用于保护容器的保护配置文件设置。 若要获取 ASRProtectionProfile 对象,请使用 New-AzureSiteRecoveryProtectionProfileObject cmdlet。
类型: | ASRProtectionProfile |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-RecoveryProtectionContainer
指定恢复保护容器。
类型: | ASRProtectionContainer |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |