< Back

New-AzureRmRecoveryServicesAsrProtectionContainerMapping

Tue Jan 29, 2019 10:01 pm

NAME New-AzureRmRecoveryServicesAsrProtectionContainerMapping



SYNOPSIS

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

container.





SYNTAX

New-AzureRmRecoveryServicesAsrProtectionContainerMapping [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Name <String> -Policy <ASRPolicy>

-PrimaryProtectionContainer <ASRProtectionContainer> -RecoveryProtectionContainer <ASRProtectionContainer> [-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.





PARAMETERS

-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with Azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the Protection Container mapping.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Policy <ASRPolicy>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-PrimaryProtectionContainer <ASRProtectionContainer>

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



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RecoveryProtectionContainer <ASRProtectionContainer>

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.)



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRPolicy







OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob







NOTES









Example 1



PS C:\\> New-AzureRmRecoveryServicesAsrProtectionContainerMapping -Name $ContainerMappingName -Policy $ProtectionProfile

-PrimaryProtectionContainer $PrimaryContainer -RecoveryProtectionContainer $RecoveryContainer



Name : 1f32fee1-05d0-4c11-a997-1618e14b4dab

ID : /Subscriptions/xxxxxxxxxxxx/resourceGroups/canaryexproute/providers/Microsoft.RecoveryServices/vaults/IbizaV2ATest/replicationJo

bs/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 : {}



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





Example 2



PS C:\\> New-AzureRmRecoveryServicesAsrProtectionContainerMapping -Name $PrimaryProtectionContainerMapping -policy $Policy1

-PrimaryProtectionContainer $pc



Name : 1f32fee1-05d0-4c11-a997-1618e14b4dab

ID : /Subscriptions/xxxxxxxxxxxx/resourceGroups/canaryexproute/providers/Microsoft.RecoveryServices/vaults/IbizaV2ATest/replicationJo

bs/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 : {}



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







RELATED LINKS

Online Version:

https://docs.microsoft.com/en-us/powers ... nermapping

Get-AzureRmRecoveryServicesAsrProtectionContainerMapping

Remove-AzureRmRecoveryServicesAsrProtectionContainerMapping