편집

다음을 통해 공유


New-AzRecoveryServicesAsrNetworkMapping

Creates an ASR network mapping between two networks.

Syntax

New-AzRecoveryServicesAsrNetworkMapping
   -Name <String>
   -PrimaryNetwork <ASRNetwork>
   -RecoveryNetwork <ASRNetwork>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrNetworkMapping
   [-AzureToAzure]
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -PrimaryAzureNetworkId <String>
   -RecoveryFabric <ASRFabric>
   -RecoveryAzureNetworkId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
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.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the ASR network mapping to create.

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

-PrimaryAzureNetworkId

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

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

-PrimaryFabric

Specifies the ASR fabric where mapping should be created.

Type:ASRFabric
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PrimaryNetwork

Specifies the primary network object for the ASR network mapping.

Type:ASRNetwork
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RecoveryAzureNetworkId

Specifies the recovery azure network ID for the network mapping.

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

-RecoveryFabric

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

Type:ASRFabric
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryNetwork

Specifies the recovery network object for the ASR network mapping.

Type:ASRNetwork
Position:Named
Default value:None
Required:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ASRNetwork

Outputs

ASRJob