Get-AzureSiteRecoveryVaultSettingsFile

Gets the Site Recovery vault settings file.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Get-AzureSiteRecoveryVaultSettingsFile
   -Name <String>
   -Location <String>
   [-SiteName <String>]
   [-SiteId <String>]
   [-Path <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryVaultSettingsFile
   -Vault <ASRVault>
   [-Site <ASRSite>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Get-AzureSiteRecoveryVaultSettingsFile cmdlet gets the settings file for an Azure Site Recovery vault.

Examples

Example 1: Get the settings file for a vault

PS C:\> $Vault = Get-AzureSiteRecoveryVault -Name "ContosoVault"
PS C:\> Get-AzureSiteRecoveryVaultSettingsFile -Vault $Vault
FilePath 
-------- 
C:\Users\ContosoAdmin\ContosoVault_2015-02-02T05-39-23.VaultCredentials

The first command gets the active Azure Site Recovery vault named ContosoVault by using the Get-AzureSiteRecoveryVault cmdlet. The command stores that vault in the $Vault variable.

The second command gets the settings file for the vault stored in $Vault.

Parameters

-Location

Specifies the geographical location to which the vault belongs.

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

-Name

Specifies the name of a vault.

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

-Path

Specifies the path of the Site Recovery vault settings file. To store this file locally, download it from the Site Recovery vault portal after the command has finished running.

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

-Site

Specifies a site for which to get a settings file. To obtain a Site object, use the Get-AzureSiteRecoverySite cmdlet.

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

-SiteId

Specifies the ID of a site.

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

-SiteName

Specifies the name of a site.

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

-Vault

Specifies the vault for the site.

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