New-AzRecoveryServicesAsrProtectionContainerMapping
建立 Azure Site Recovery Protection 容器對應,方法是將指定的復寫策略與指定的 ASR 保護容器產生關聯。
Syntax
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>]
Description
New-AzRecoveryServicesAsrProtectionContainerMapping Cmdlet 會建立 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
指定要用於對應之複製策略的 ASR 複製策略物件。
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 保護容器物件(如果復寫至非 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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應