New-AzRecoveryServicesAsrNetworkMapping
Creates an ASR network mapping between two networks.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
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
Flag to create AzureToAzure scenario.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Name of the ASR network mapping to create.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the Azure virtual network ID of the primary network for the mapping.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the ASR fabric where mapping should be created.
| Type: | ASRFabric |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the primary network object for the ASR network mapping.
| Type: | ASRNetwork |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the recovery azure network ID for the network mapping.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The Azure Site Recovery fabric object corresponding to the recovery Azure region.
| Type: | ASRFabric |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the recovery network object for the ASR network mapping.
| Type: | ASRNetwork |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |