Get-​Azure​Site​Recovery​Storage​Mapping

Gets mappings of Site Recovery Storage objects for a vault.

Syntax

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

Description

The Get-AzureSiteRecoveryStorageMapping cmdlet gets mappings of Azure Site Recovery Storage objects for the current Azure Site Recovery vault.

Examples

Example 1: Get the mapping between a Storage object and a recovery Storage object

PS C:\> $Servers = Get-AzureSiteRecoveryServer
PS C:\> Get-AzureSiteRecoveryStorageMapping -PrimaryServer $Servers[0] -RecoveryServer $Servers[1]
PrimaryServerId     : 774859b0-1966-48cc-9df7-759c441b7a8c
PrimaryStorageId    : 1c1d0c0b-0c50-4675-af1a-1fdac70dbb6d
PrimaryStorageName  : phase2PrimaryStorageClassification
RecoveryServerId    : 774859b0-1966-48cc-9df7-759c441b7a8c
RecoveryStorageId   : 20cf8d92-fd5d-4872-985a-0f4562b8a0bf
RecoveryStorageName : phase2RecoveryStorageClassification

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 two Azure Storage objects. The command specifies the primary server for the Storage object mapping as the first element of $Servers. The command specifies the server for the recovery Storage object as the second element of $Servers.

Required Parameters

-PrimaryServer

Specifies the primary server. To obtain a server, use the Get-AzureSiteRecoveryServer cmdlet.

Type:ASRServer
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryServer

Specifies the recovery server. To obtain a server, use Get-AzureSiteRecoveryServer.

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

Optional Parameters

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