Skip to content

Latest commit

 

History

History
153 lines (117 loc) · 4.58 KB

Get-AzureSiteRecoveryNetworkMapping.md

File metadata and controls

153 lines (117 loc) · 4.58 KB
external help file ms.assetid online version schema
Microsoft.Azure.Commands.RecoveryServicesRdfe.dll-Help.xml
F6C01C25-655C-4798-9826-F7CB168181C7
2.0.0

Get-AzureSiteRecoveryNetworkMapping

SYNOPSIS

Gets network mappings for a Site Recovery vault.

[!INCLUDE rdfe-banner]

SYNTAX

EnterpriseToEnterprise

Get-AzureSiteRecoveryNetworkMapping -PrimaryServer <ASRServer> -RecoveryServer <ASRServer>
 [-Profile <AzureSMProfile>] [<CommonParameters>]

EnterpriseToAzure

Get-AzureSiteRecoveryNetworkMapping -PrimaryServer <ASRServer> [-Azure] [-Profile <AzureSMProfile>]
 [<CommonParameters>]

DESCRIPTION

The Get-AzureSiteRecoveryNetworkMapping cmdlet gets information about Azure Site Recovery network mappings for the current Site Recovery vault.

EXAMPLES

Example 1: Get the mapping between a network and a recovery network

PS C:\> $Servers = Get-AzureSiteRecoveryServer
PS C:\> Get-AzureSiteRecoveryNetworkMapping -PrimaryServer $Servers[0] -RecoveryServer $Servers[0]
PrimaryServerId     : 774859b0-1966-48cc-9df7-759c441b7a8c
PrimaryNetworkId    : 7cfd636e-5cc2-4e01-873b-8a7aa4962341
PrimaryNetworkName  : phase2RecoveryVMNetwork
RecoveryServerId    : 774859b0-1966-48cc-9df7-759c441b7a8c
RecoveryNetworkId   : d903e2c6-3141-4cef-bfe1-04616cd43cbb
RecoveryNetworkName : phase2PrimaryVMNetwork
PairingStatus       : OK

The first command cmdlet gets servers for the current Azure Site Recovery vault by using the Get-AzureSiteRecoveryServer cmdlet. The command stores the Site Recovery servers in the $Servers array variable.

The second command gets the mapping between the primary network and the recovery network. The command specifies the primary server for the network mapping as the first element of $Servers. The command specifies the server for the recovery network as the second element of $Servers.

Example 2: Get the mapping between a network and an Azure virtual machine network

PS C:\> $Servers = Get-AzureSiteRecoveryServer
PS C:\> Get-AzureSiteRecoveryNetworkMapping -Azure -PrimaryServer $Servers[0] 
PrimaryServerId     : 774859b0-1966-48cc-9df7-759c441b7a8c
PrimaryNetworkId    : 7cfd636e-5cc2-4e01-873b-8a7aa4962341
PrimaryNetworkName  : phase2RecoveryVMNetwork
RecoveryServerId    : 21a9403c-6ec1-44f2-b744-b4e50b792387
RecoveryNetworkId   : ecb3a462-664f-4f57-873e-d09b5925e1a1
RecoveryNetworkName : AzureVMNetwork
PairingStatus       : OK

The first command cmdlet gets servers for the current Site Recovery vault. The command stores the servers in the $Servers array variable.

The second command gets a mapping between the primary network and an Azure virtual machine network. The command specifies the primary server for the network as the first element of $Servers. The command specifies the Azure parameter. Therefore, the command gets the mapping to an Azure virtual machine network.

PARAMETERS

-Azure

Indicates that this cmdlet gets network mappings for networks on the primary server mapped to Azure virtual networks.

Type: SwitchParameter
Parameter Sets: EnterpriseToAzure
Aliases: 

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

-PrimaryServer

Specifies a primary server for which to get mappings.

Type: ASRServer
Parameter Sets: (All)
Aliases: 

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

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type: AzureSMProfile
Parameter Sets: (All)
Aliases: 

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

-RecoveryServer

Specifies a recovery server for which to get mappings.

Type: ASRServer
Parameter Sets: EnterpriseToEnterprise
Aliases: 

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

RELATED LINKS

New-AzureSiteRecoveryNetworkMapping

Remove-AzureSiteRecoveryNetworkMapping