New-​Azure​Rm​Recovery​Services​Asr​Protection​Container​Mapping

Creates an Azure Site Recovery Protection Container mapping by associating the specified replication policy to the specified ASR protection container.

Syntax

New-AzureRmRecoveryServicesAsrProtectionContainerMapping
   -Name <String>
   -Policy <ASRPolicy>
   -PrimaryProtectionContainer <ASRProtectionContainer>
   -RecoveryProtectionContainer <ASRProtectionContainer>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmRecoveryServicesAsrProtectionContainerMapping cmdlet creates an Azure Site Recovery Protection Container mapping by associating the specified replication policy to the specified protection container.

Examples

Example 1

PS C:\> $currentJob = New-AzureRmRecoveryServicesAsrProtectionContainerMapping -Name $ContainerMappingName -Policy $ProtectionProfile -PrimaryProtectionContainer $PrimaryContainer -RecoveryProtectionContainer $RecoveryContainer

Starts the creation of the protection container mapping with the specified parameters, and returns the ASR job used to track the operation.

Required Parameters

-Name

Specifies the name of the Protection Container mapping.

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

Specifies the ASR replication policy object for the replication policy to be used in the mapping.

Type:ASRPolicy
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-PrimaryProtectionContainer

Specifies the ASR protection container object for the primary protection container to be used in the mapping.

Type:ASRProtectionContainer
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryProtectionContainer

Specifies the ASR protection container object for the recovery protection container to be used in the mapping (used if replicating to a recovery location that is not Azure.)

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRPolicy

Outputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob