Edit

Share via


New-AzRecoveryServicesAsrNetworkMapping

Creates an ASR network mapping between two networks.

Syntax

EnterpriseToEnterprise (Default)

New-AzRecoveryServicesAsrNetworkMapping
    -Name <String>
    -PrimaryNetwork <ASRNetwork>
    -RecoveryNetwork <ASRNetwork>
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AzureToAzure

New-AzRecoveryServicesAsrNetworkMapping
    -Name <String>
    -PrimaryFabric <ASRFabric>
    -PrimaryAzureNetworkId <String>
    -RecoveryFabric <ASRFabric>
    -RecoveryAzureNetworkId <String>
    [-AzureToAzure]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

EnterpriseToAzure

New-AzRecoveryServicesAsrNetworkMapping
    -Name <String>
    -PrimaryNetwork <ASRNetwork>
    -RecoveryAzureNetworkId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-AzRecoveryServicesAsrNetworkMapping cmdlet starts the operation of creating an ASR network mapping between two networks and returns the ASR job object for the ASR job used to track the operation.

Examples

Example 1

$currentJob = New-AzRecoveryServicesAsrNetworkMapping -Name $NetworkMapName -PrimaryNetwork $PrimaryNetwork -RecoveryNetwork $RecoveryNetwork

Starts the network mapping creation operation using the specified name, primary and recovery networks, and returns an ASR job to track the operation.

Example 2

$currentJob = New-AzRecoveryServicesAsrNetworkMapping -AzureToAzure -Name "mappingName" -PrimaryFabric $AzureFabric `
 -PrimaryAzureNetworkId $AzureNetworkId -RecoveryFabric $RecoveryAzureFabric -RecoveryAzureNetworkId $RecoveryNetworkId

Starts the network mapping for creation operation using the specified name, primary and recovery networks, and returns an ASR job to track the operation(Azure to Azure scenario).

Parameters

-AzureToAzure

Flag to create AzureToAzure scenario.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the ASR network mapping to create.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryAzureNetworkId

Specifies the Azure virtual network ID of the primary network for the mapping.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryFabric

Specifies the ASR fabric where mapping should be created.

Parameter properties

Type:ASRFabric
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryNetwork

Specifies the primary network object for the ASR network mapping.

Parameter properties

Type:ASRNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EnterpriseToEnterprise
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
EnterpriseToAzure
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryAzureNetworkId

Specifies the recovery azure network ID for the network mapping.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
EnterpriseToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryFabric

The Azure Site Recovery fabric object corresponding to the recovery Azure region.

Parameter properties

Type:ASRFabric
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryNetwork

Specifies the recovery network object for the ASR network mapping.

Parameter properties

Type:ASRNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EnterpriseToEnterprise
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ASRNetwork

Outputs

ASRJob