New-​Azure​Rm​Recovery​Services​Asr​Replication​Protected​Item

Enables replication for an ASR protectable item by creating a replication protected item

Syntax

New-AzureRmRecoveryServicesAsrReplicationProtectedItem
   -Name <String>
   -ProtectableItem <ASRProtectableItem>
   -ProtectionContainerMapping <ASRProtectionContainerMapping>
   [-WaitForCompletion]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureRmRecoveryServicesAsrReplicationProtectedItem
   -Name <String>
   -ProtectableItem <ASRProtectableItem>
   -ProtectionContainerMapping <ASRProtectionContainerMapping>
   -RecoveryAzureStorageAccountId <String>
   -RecoveryResourceGroupId <String>
   [-WaitForCompletion]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureRmRecoveryServicesAsrReplicationProtectedItem
   -Name <String>
   -OS <String>
   -OSDiskName <String>
   -ProtectableItem <ASRProtectableItem>
   -ProtectionContainerMapping <ASRProtectionContainerMapping>
   -RecoveryAzureStorageAccountId <String>
   -RecoveryResourceGroupId <String>
   [-WaitForCompletion]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmRecoveryServicesAsrReplicationProtectedItem cmdlet creates a new replication protected item. Use this cmdlet to enable replication for an ASR protectable item.

Examples

Example 1

PS C:\> $currentJob = New-AzureRmRecoveryServicesAsrReplicationProtectedItem -ProtectableItem $VM -Name $VM.Name -ProtectionContainerMapping $ProtectionContainerMapping

Starts the replication protected item creation operation for the specified ASR protectable item and returns the ASR job used to track the operation.

Required Parameters

-Name

Specifies a name for the ASR replication protected item.

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

Specifies the operating system family. The acceptable values for this parameter are: Windows or Linux.

Type:String
Parameter Sets:Windows, Linux
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OSDiskName

Specifies the name of the operating system disk.

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

Specifies the ASR protectable item object for which replication is being enabled.

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

Specifies the ASR protection container mapping object corresponding to the replication policy to be used for replication.

Type:ASRProtectionContainerMapping
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryAzureStorageAccountId

Specifies the ID of the Azure storage account to replicate to.

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

Specifies the ARM identifier of the resource group in which the virtual machine will be created in the event of a failover.

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

Optional Parameters

-Confirm

Prompts for confirmation before starting the operation.

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

Specifies that the cmdlet should wait for completion of the operation before returning.

Type:SwitchParameter
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.ASRProtectableItem

Outputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob