你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzRecoveryServicesAsrProtectionContainerMapping
通过将指定的 副本 (replica)tion 策略关联到指定的 ASR 保护容器来创建 Azure Site Recovery 保护容器映射。
语法
New-AzRecoveryServicesAsrProtectionContainerMapping
-Name <String>
-Policy <ASRPolicy>
-PrimaryProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzRecoveryServicesAsrProtectionContainerMapping
-Name <String>
-Policy <ASRPolicy>
-PrimaryProtectionContainer <ASRProtectionContainer>
-RecoveryProtectionContainer <ASRProtectionContainer>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
New-AzRecoveryServicesAsrProtectionContainerMapping cmdlet 通过将指定的 副本 (replica)tion 策略关联到指定的保护容器来创建 Azure Site Recovery 保护容器映射。
示例
示例 1
New-AzRecoveryServicesAsrProtectionContainerMapping -Name $ContainerMappingName -Policy $ProtectionProfile -PrimaryProtectionContainer $PrimaryContainer -RecoveryProtectionContainer $RecoveryContainer
Name : 1f32fee1-05d0-4c11-a997-1618e14b4dab
ID : /Subscriptions/xxxxxxxxxxxx/resourceGroups/canaryexproute/providers/Microsoft.RecoveryServices/vaults/IbizaV2ATest/replicationJobs/1f32fee1-05d0-4c11-a997-1618e14b4dab
Type :
JobType :
DisplayName :
ClientRequestId : 2870d5ab-f9be-405e-87d5-5bf20387c623 ActivityId: 24b28fc5-509b-4ad3-92c0-c8bb7ced7fb6
State : NotStarted
StateDescription : NotStarted
StartTime :
EndTime :
TargetObjectId :
TargetObjectType :
TargetObjectName :
AllowedActions :
Tasks : {}
Errors : {}
使用指定的参数开始创建保护容器映射,并返回用于跟踪操作的 ASR 作业。
示例 2
New-AzRecoveryServicesAsrProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -policy $Policy1 -PrimaryProtectionContainer $pc
Name : 1f32fee1-05d0-4c11-a997-1618e14b4dab
ID : /Subscriptions/xxxxxxxxxxxx/resourceGroups/canaryexproute/providers/Microsoft.RecoveryServices/vaults/IbizaV2ATest/replicationJobs/1f32fee1-05d0-4c11-a997-1618e14b4dab
Type :
JobType :
DisplayName :
ClientRequestId : 2870d5ab-f9be-405e-87d5-5bf20387c623 ActivityId: 24b28fc5-509b-4ad3-92c0-c8bb7ced7fb6
State : NotStarted
StateDescription : NotStarted
StartTime :
EndTime :
TargetObjectId :
TargetObjectType :
TargetObjectName :
AllowedActions :
Tasks : {}
Errors : {}
使用指定的参数开始创建保护容器映射,并返回用于跟踪操作的 ASR 作业。
参数
-Confirm
提示你在运行 cmdlet 之前进行确认。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定保护容器映射的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Policy
指定要在映射中使用的副本 (replica)策略的 ASR 副本 (replica)tion 策略对象。
Type: | ASRPolicy |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PrimaryProtectionContainer
指定要在映射中使用的主保护容器的 ASR 保护容器对象。 若要获取恢复服务容器中的 ASR 保护容器,请 运行 Get-AzRecoveryServicesAsrProtectionContainer cmdlet。
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryProtectionContainer
指定要在映射中使用的恢复保护容器的 ASR 保护容器对象(如果副本 (replica)到不是 Azure 的恢复位置时使用)。
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
输出
相关链接
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈