Edit

Share via


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

ByParam (Default)

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

ByObject

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a vault.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:AzureSMProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Site

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

Parameter properties

Type:ASRSite
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SiteId

Specifies the ID of a site.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SiteName

Specifies the name of a site.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParam
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Vault

Specifies the vault for the site.

Parameter properties

Type:ASRVault
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.