< Back

New-AzureSiteRecoveryNetworkMapping

Wed Jan 30, 2019 5:48 pm

NAME New-AzureSiteRecoveryNetworkMapping



SYNOPSIS

Creates a mapping between two Networks





SYNTAX

New-AzureSiteRecoveryNetworkMapping -PrimaryNetwork <ASRNetwork> -RecoveryNetwork <ASRNetwork> [<CommonParameters>]



New-AzureSiteRecoveryNetworkMapping -PrimaryNetwork <ASRNetwork> -AzureSubscriptionId <string> -AzureVMNetworkId <string> [<CommonParameters>]





DESCRIPTION

Creates a mapping between two Networks





PARAMETERS

-PrimaryNetwork <ASRNetwork>

Primary Network object



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RecoveryNetwork <ASRNetwork>





Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AzureSubscriptionId <string>

Azure Subscription Id



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AzureVMNetworkId <string>

Azure VM Network Id



Required? true

Position? named

Default value

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES







Keywords: azure, azuresm, servicemanagement, management, service, site, recovery







-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$networks = Get-AzureSiteRecoveryNetwork -Server $servers[0]



PS C:\\> New-AzureSiteRecoveryNetworkMapping -PrimaryNetwork $networks[0] -RecoveryNetwork $networks[1]



Name :

ID : 417dc3e8-3f9d-47dd-9c41-b3b3d566c3ac

ClientRequestId : 64ed0fcf-263d-404f-8657-4bf971e58730-2015-01-30 05:33:07Z-P

State : NotStarted

StateDescription : NotStarted

StartTime :

EndTime :

AllowedActions :

Tasks : {}

Errors : {}







PS C:\\> Get-AzureSiteRecoveryJob -Id 417dc3e8-3f9d-47dd-9c41-b3b3d566c3ac



Name : NetworkPairing

ID : 417dc3e8-3f9d-47dd-9c41-b3b3d566c3ac

ClientRequestId : 64ed0fcf-263d-404f-8657-4bf971e58730-2015-01-30 05:33:07Z-P

State : Succeeded

StateDescription : Completed

StartTime : 1/30/2015 5:33:11 AM

EndTime : 1/30/2015 5:33:12 AM

AllowedActions :

Tasks : {Map network, Attach network (0)}

Errors : {}



Description



-----------











-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$networks = Get-AzureSiteRecoveryNetwork -Server $servers[0]



PS C:\\> $subscriptions = Get-AzureSubscription



PS C:\\> $azureVmNetworks = Get-AzureVNetSite



PS C:\\> New-AzureSiteRecoveryNetworkMapping -PrimaryNetwork $networks[0] -AzureSubscriptionId $subscriptions[0].SubscriptionId

-AzureVMNetworkId $azureVmNetworks[0].Id



Name :

ID : f4fef3b3-e151-47ac-90a0-b5b8712fd14e

ClientRequestId : 56948c99-4e0c-4a86-8dcb-751b150e79fd-2015-01-30 05:38:29Z-P

State : NotStarted

StateDescription : NotStarted

StartTime :

EndTime :

AllowedActions :

Tasks : {}

Errors : {}







PS C:\\> Get-AzureSiteRecoveryJob -Id f4fef3b3-e151-47ac-90a0-b5b8712fd14e



Name : NetworkPairing

ID : f4fef3b3-e151-47ac-90a0-b5b8712fd14e

ClientRequestId : 56948c99-4e0c-4a86-8dcb-751b150e79fd-2015-01-30 05:38:29Z-P

State : Succeeded

StateDescription : Completed

StartTime : 1/30/2015 5:38:34 AM

EndTime : 1/30/2015 5:38:36 AM

AllowedActions :

Tasks : {Map network, Attach network (0)}

Errors : {}



Description



-----------













RELATED LINKS